whilelucky / pwa

An opinionated progressive web app boilerplate
MIT License
357 stars 47 forks source link

npm install fails on Windows 10 #8

Open stasled opened 6 years ago

stasled commented 6 years ago
$ npm install

> integer@1.0.1 install C:\www\NodeJS\React-Express\pwa\node_modules\integer
> node tools/install

C:\www\NodeJS\React-Express\pwa\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files (x86)\Python36-32\python.exe", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\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.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\www\NodeJS\React-Express\pwa\node_modules\integer
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> farmhash@1.2.1 install C:\www\NodeJS\React-Express\pwa\node_modules\farmhash
> node-gyp rebuild

C:\www\NodeJS\React-Express\pwa\node_modules\farmhash>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files (x86)\Python36-32\python.exe", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Program Files\nodejs\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.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\www\NodeJS\React-Express\pwa\node_modules\farmhash
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> pre-commit@1.2.2 install C:\www\NodeJS\React-Express\pwa\node_modules\pre-commit
> node install.js

> spawn-sync@1.0.15 postinstall C:\www\NodeJS\React-Express\pwa\node_modules\spawn-sync
> node postinstall

> uglifyjs-webpack-plugin@0.4.6 postinstall C:\www\NodeJS\React-Express\pwa\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js

> preact@8.2.6 postinstall C:\www\NodeJS\React-Express\pwa\node_modules\preact
> node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"

Love Preact? You can now donate to our open collective:
 > https://opencollective.com/preact/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: integer@1.0.1 (node_modules\integer):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: integer@1.0.1 install: `node tools/install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 (node_modules\farmhash):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: farmhash@1.2.1 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

Python env variable exists and specify path to C:\Program Files (x86)\Python36-32\python.exe. npm config set python 'C:\Program Files (x86)\Python36-32\python.exe' or npm install --python= 'C:\Program Files (x86)\Python36-32\python.exe' give the same result.

node v8.9.0 npm 5.5.1 $ python -V Python 3.6.1

Sarah-Gr commented 6 years ago

I also have this error please help, I have python3.6.4 correctly installed with node 9.4. gyp gives this error