tuandm/laravue

Running npm install

malishben360 opened this issue · 9 comments

Over two weeks now I have been trying to setup laravue locally on my machine windows 10, when ever i run npm install

npm ERR! code 1
npm ERR! path C:\xampp\htdocs\projects\laravue\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\xampp\htdocs\projects\laravue\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\Program Files\nodejs\node.exe',
npm ERR! gyp verb cli 'C:\xampp\htdocs\projects\laravue\node_modules\node-gyp\bin\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.14.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "c:\python39\python.exe" in the PATH
npm ERR! gyp verb which succeeded c:\python39\python.exe c:\python39\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: c:\python39\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack File "", line 1
npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:326:12)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\xampp\htdocs\projects\laravue\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\xampp\htdocs\projects\laravue\node_modules\node-sass
npm ERR! gyp ERR! node -v v15.14.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\MALISH\AppData\Local\npm-cache_logs\2021-06-29T18_07_07_585Z-debug.log

Node version?

Node version?

15.14.0

I tried node version 16.4.0 I got same errors

You can try node version 12.16.2.
I try version 12.16.2 is no error.
Version 15.14.0 same error with you
https://nodejs.org/dist/v12.16.2/

You can try node version 12.16.2.
I try version 12.16.2 is no error.
Version 15.14.0 same error with you
https://nodejs.org/dist/v12.16.2/

I was able to install it successfully now thanks for your support!
I used Virtual Studio Build Tools 2015 and python 2.7.0 with Node.js@15.14.0

I run this two command

npm config set msvs_version 2015 –global

npm config set python python2.7

that you network not access node help for you can see the github : https://github.com/whitexiong/laravue

This happens because node-gyp 3.8 does not support python3.
However in your os the "python" command is linked to c:\python39\python.exe
Manually update node-gyp (not global) to latest can solve this problem,

somebody help nothing works :(