ndbroadbent / react-native-web-webpack

A complete webpack configuration for react-native-web, optimized for both development and production
139 stars 32 forks source link

npm ERR! Failed at the ExampleApp@0.0.1 web script #2

Open damiaozi opened 7 years ago

damiaozi commented 7 years ago

do react-native run-android, it run right, but npm run web ,it run error, error detail:

`

npm run web

ExampleApp@0.0.1 web E:\rn4web\rn4web-webpack [ -d web/vendor-dev ] || npm run web:build:vendor-dev && NODE_ENV=development webpack-dev-server -d --host 0.0.0.0 --port 3000 --config web/webpack.config.js --inline --hot --colors

ExampleApp@0.0.1 web:build:vendor-dev E:\rn4web\rn4web-webpack rm -rf web/vendor-dev; NODE_ENV=development webpack --config web/vendor.webpack.config.js || rm -rf web/vendor-dev

rm: unknown option -- config Try 'rm --help' for more information. 'NODE_ENV' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒ ▒▒▒▒▒▒▒▒▒ļ▒▒▒

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "web" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! ExampleApp@0.0.1 web: [ -d web/vendor-dev ] || npm run web:build:vendor-dev && NODE_ENV=development webpack-dev-server -d --host 0.0.0.0 --port 3000 --config web/webpack.config.js --inline --hot --colors npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ExampleApp@0.0.1 web script '[ -d web/vendor-dev ] || npm run web:build:vendor-dev && NODE_ENV=development webpack-dev-server -d --host 0.0.0.0 --port 3000 --config web/webpack.config.js --inline --hot --colors'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ExampleApp package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! [ -d web/vendor-dev ] || npm run web:build:vendor-dev && NODE_ENV=development webpack-dev-server -d --host 0.0.0.0 --port 3000 --config web/webpack.config.js --inline --hot --colors npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ExampleApp npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls ExampleApp npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! E:\rn4web\rn4web-webpack\npm-debug.log

`

friend,i need your help!thanks in advance!

ndbroadbent commented 7 years ago

Hi, sorry it currently doesn't work on Windows, only on Mac and Linux. But I have made a lot of changes to the code I am using in my own app, which now works on Windows, so I will update this code soon

damiaozi commented 7 years ago

Thank you very much, you can answer my question. I"ll keep an eye on your code.bu why it currently doesn't work on Windows? I am a novice, would like to learn rn4web, can you give me some advice?

damiaozi commented 7 years ago

I want to use Bash on Ubuntu on Windows。Excuse me, is this feasible?

pyrossh commented 7 years ago

Again try using this if need be https://github.com/agrcrobles/react-native-web-boilerplate.

And it doesn't work properly since it uses a lot of bash scripting. I removed all the bash stuff like using clean-webpack-plugin and other stuff but can't test it on windows.