node -v 11.2.0 and npm -v 6.4.1 Platform: Windows 10
Module: npm install
Verbose output (from npm or node-gyp):
Building: C:\Program Files\nodejs\node.exe d:\nprojetos\vue+nativescript+ml_kit\nativescript-with-vue\nativescript-vue-firebase-template\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'd:\\nprojetos\\vue+nativescript+ml_kit\\nativescript-with-vue\\nativescript-vue-firebase-template\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe" in the PATH
gyp verb `which` succeeded C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe -c import platform; print(platform.python_version());
gyp ERR! stack ImportError: No module named site
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "d:\\nprojetos\\vue+nativescript+ml_kit\\nativescript-with-vue\\nativescript-vue-firebase-template\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd d:\nprojetos\vue+nativescript+ml_kit\nativescript-with-vue\nativescript-vue-firebase-template\node_modules\node-sass
gyp ERR! node -v v11.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\adrie\AppData\Roaming\npm-cache\_logs\2018-12-07T13_34_30_167Z-debug.log
Paste your log between the backticks. Contents of npm-debug.log or verbose build output
this is the end of the log file
3704 silly saveTree | | | +-- [email protected]
3704 silly saveTree | | | `-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | +-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | | +-- [email protected]
3704 silly saveTree | | | +-- [email protected]
3704 silly saveTree | | | `-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | +-- [email protected]
3704 silly saveTree | | +-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | | `-- [email protected]
3704 silly saveTree | +-- [email protected]
3704 silly saveTree | +-- [email protected]
3704 silly saveTree | `-- [email protected]
3704 silly saveTree `-- [email protected]
3704 silly saveTree `-- [email protected]
3704 silly saveTree +-- [email protected]
3704 silly saveTree +-- [email protected]
3704 silly saveTree +-- [email protected]
3704 silly saveTree +-- [email protected]
3704 silly saveTree `-- [email protected]
3705 warn [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
3706 warn [email protected] No repository field.
3707 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
3708 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
3709 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
3709 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
3709 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
3709 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
3710 verbose stack Error: [email protected] postinstall: `node scripts/build.js`
3710 verbose stack Exit status 1
3710 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
3710 verbose stack at EventEmitter.emit (events.js:182:13)
3710 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
3710 verbose stack at ChildProcess.emit (events.js:182:13)
3710 verbose stack at maybeClose (internal/child_process.js:978:16)
3710 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
3711 verbose pkgid [email protected]
3712 verbose cwd d:\nprojetos\vue+nativescript+ml_kit\nativescript-with-vue\nativescript-vue-firebase-template
3713 verbose Windows_NT 10.0.17134
3714 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
3715 verbose node v11.2.0
3716 verbose npm v6.4.1
3717 error code ELIFECYCLE
3718 error errno 1
3719 error [email protected] postinstall: `node scripts/build.js`
3719 error Exit status 1
3720 error Failed at the [email protected] postinstall script.
3720 error This is probably not a problem with npm. There is likely additional logging output above.
3721 verbose exit [ 1, true ]
I found a 5 step solution
npm install -g node-gyp
npm install --global --production windows-build-tools
node-gyp --python C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe
npm config set python python2.7
npm config set python C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe
gyp ERR! stack Error: Command failed: C:\Users\adrie\AppData\Local\conda\conda\envs\py27\python.exe -c import platform; print(platform.python_version());
gyp ERR! stack ImportError: No module named site
Looks like this was an issue with your Python installation. Can this be closed now?