Open damiaozi opened 7 years ago
It seems to work for me in linux. I don't know if it will work in windows properly. Another alternative way to use it maybe run it in a docker container. Please try using this project also https://github.com/agrcrobles/react-native-web-boilerplate
do npm install have many error:
$ npm install npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
node-pre-gyp ERR! Tried to download(undefined): https://node-zopfli.s3.amazonaws.com/Release/zopfli-v2.0.2-node-v57-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@2.0.2 and node@8.1.0 (node-v57 ABI) (falling back to source compile with node-gyp)
E:\rn4web\rn4web-webpack\node_modules\node-zopfli>if not defined npm_config_node _gyp (node "C:\Users\24532\AppData\Roaming\nvm\v8.1.0\node_modules\npm\bin\node- gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
E:\rn4web\rn4web-webpack\node_modules\node-zopfli>if not defined npm_config_node_gyp (node "C:\Users\24532\AppData\Roaming\nvm\v8.1.0\node_modules\npm\bin\node- gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node- v57-win32-x64\zopfli.node --module_name=zopfli --module_path=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64 ) else (node "" c onfigure --fallback-to-build --module=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64\zopfli.node --module_name=zopfli --module _path=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64 ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Users\24532\AppData\Roaming\nvm\v8.1.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19) gyp ERR! stack at PythonFinder. (C:\Users\24532\AppData\Roaming\nvm\v8.1.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Users\24532\AppData\Roaming\nvm\v8.1.0\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\24532\AppDat a\Roaming\nvm\v8.1.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=E:\rn4web\rn4web-webpack\no de_modules\node-zopfli\lib\binding\node-v57-win32-x64\zopfli.node" "--module_name=zopfli" "--module_path=E:\rn4web\rn4web-webpack\node_modules\node-zop fli\lib\binding\node-v57-win32-x64"
gyp ERR! cwd E:\rn4web\rn4web-webpack\node_modules\node-zopfli
gyp ERR! node -v v8.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\bind ing\node-v57-win32-x64\zopfli.node --module_name=zopfli --module_path=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (E:\rn4web\rn4web-webpack\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\rn4web\rn4web-webpack\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallbac k-to-build"
node-pre-gyp ERR! cwd E:\rn4web\rn4web-webpack\node_modules\node-zopfli
node-pre-gyp ERR! node -v v8.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.36
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64\zopfli.n ode --module_name=zopfli --module_path=E:\rn4web\rn4web-webpack\node_modules\node-zopfli\lib\binding\node-v57-win32-x64' (1)
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN react-native-web@0.0.88 requires a peer of react@15.4.x || 15.5.x but none was installed. npm WARN react-native-web@0.0.88 requires a peer of react-dom@15.4.x || 15.5.x but none was installed. npm WARN react-dom@15.6.1 requires a peer of react@^15.6.1 but none was installed. npm WARN url-loader@0.5.9 requires a peer of file-loader@* 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 WARN optional SKIPPING OPTIONAL DEPENDENCY: node-zopfli@2.0.2 (node_modules\node-zopfli): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-zopfli@2.0.2 install:
node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1added 1025 packages in 165.439s