Open xiang193 opened 7 years ago
webpack.config.js 这个文件在其实在这个路径下有 "....node_modules/_react-web@0.4.6@react-web/webpack.config.js" demo里面这个文件的路径是"....node_modules/_react-web@0.4.6@react-web/webpack.config.js"
尝试把"....node_modules/_react-web@0.4.6@react-web/webpack.config.js" copy到"....node_modules/_react-web@0.4.6@react-web/web/webpack.config.js" 但是会报别的错误
是不是我哪里配置有问题,或者哪里没改对 新建了项目之后就没有改过,都是init之后的
提示warning是说某些包因为版本不对没有install 我就把包按照提示的版本都安装了一下
编译过了,后面有问题再看吧 修改了一个路径 react-web/local-cli/defaultConfig.js
//const WEBPACK_CONFIG = 'web/webpack.config.js';
const WEBPACK_CONFIG = 'webpack.config.js';
3000端口是开了,貌似还是有问题,页面没响应 DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
node 7.6.0 升级中
升级之后,我就彻底放弃了
npm run demo 能跑吗
换了版本之后 react-web init 都会失败报错
Error: Couldn't find preset "react-native" relative to directory "/Users/xiang/dev-source/java/react/abc"
当前版本
➜ react npm -v 5.0.1 ➜ react node -v v8.0.0
之前node版本是7.6.0,前面的都跑通了,最后启动3000端口都开了,但是访问无效
能加个微信么?
cd react-web && npm install 错误挺多
4 warnings and 1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/8.0.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/usr/local/Cellar/node/8.0.0_1/bin/node" "/usr/local/Cellar/node/8.0.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/xiang/dev-source/java/react/react-web/node_modules/contextify
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
npm WARN react-web@0.4.6 requires a peer of react@^15.4 but none was installed.
npm WARN react-web@0.4.6 requires a peer of react-dom@^15.4 but none was installed.
npm WARN animated@0.1.3 requires a peer of react@* but none was installed.
npm WARN animated@0.1.3 requires a peer of react-dom@* but none was installed.
npm WARN react-hot-api@0.4.7 requires a peer of react@>=0.11.0 || ^0.14.0-rc but none was installed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
如果你不是执意要跟这个安装过程刚下去的话,可以先用这个去跑:https://github.com/sandofsuro/NectarBoxOnWeb 配置好入口文件,用npm run demo去跑,pages里面是可以看到打包结果的。
报错,查看原因是 node版本高, 有不降node 版本的解决方案吗,谢谢
react-native init test react-web init test cd test
cd test && npm install 安装依赖包的时候,有些报了一些warning,提示包的依赖问题 用cnpm一个一个安装之后,执行npm install 没有warning了 但是在 执行 react-web start 报下面的错误 Error: Can't find webpack config file at "....node_modules/_react-web@0.4.6@react-web/web/webpack.config.js"