Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running npm install #310

Open
malishben360 opened this issue Jun 29, 2021 · 9 comments
Open

Running npm install #310

malishben360 opened this issue Jun 29, 2021 · 9 comments

Comments

@malishben360
Copy link

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 [email protected]
npm ERR! gyp info using [email protected] | 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

@diudiudiuu
Copy link

Node version?

@malishben360
Copy link
Author

Node version?

15.14.0

@malishben360
Copy link
Author

I tried node version 16.4.0 I got same errors

@diudiudiuu
Copy link

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/

@malishben360
Copy link
Author

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 [email protected]

@malishben360
Copy link
Author

I run this two command

npm config set msvs_version 2015 –global

npm config set python python2.7

@whitexiong
Copy link

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

@vitechliu
Copy link

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,

@danangs57
Copy link

somebody help nothing works :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants