My application was running fine but all of sudden showing the following error when i try npm i. my node version is: v6.10.3 and npm version: 3.10.10
npm WARN prefer global node-gyp#3.6.2 should be installed with -g
> node-sass#4.7.1 install C:\Projects\Latest_Nov20\FrontEnd\OdyssEY-UI-Core\node_modules\node-sass
> node scripts/install.js
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\2024522\\AppData\\Roaming\\npm\\node_modules\\node-sass\\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 node-gyp#3.6.2
gyp info using node#6.10.3 | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\Users\2024522\AppData\Roaming\npm\node_modules\node-sass\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:123:15)
gyp verb `which` failed python2 { Error: not found: python2
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.1/win32-x64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.1/win32-x64-48_binding.node":
tunneling socket could not be established, cause=getaddrinfo ENOTFOUND empweb2.ey.net empweb2.ey.net:80
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass#4.7.1 postinstall C:\Projects\Latest_Nov20\FrontEnd\OdyssEY-UI-Core\node_modules\node-sass
> node scripts/build.js
I was trying installing nvm and uninstalled nvm. only after this, i am getting this error.
Can anyone help me what am i doing wrong here?
Thanks
I have faced and fixed this issue relates node-sass and python error.Try installing latest angular cli command with the steps below
Set the system variable path as well:
C:\Users\windowsusername\AppData\Roaming\npm
C:\Users\windowsusername\AppData\Roaming\npm\node_modules\#angular\cli\bin;
C:\Program Files\nodejs;
Then start using angular cli command prompt using:
angular client project folder path>npm install -g #angular/cli#latest
angular client project folder path>npm install -g node-gyp
Related
npm install fails and my goal is to get it to succeed.
I have Python 2 installed, but it is located at /usr/bin/python2 and not /usr/local/bin/python2.
I get the following error message when running npm install.
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 verb cli ]
gyp info using node-gyp#3.8.0
gyp info using node#14.2.0 | darwin | 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 "/usr/local/bin/python2" in the PATH
gyp verb `which` failed Error: not found: /usr/local/bin/python2
What should I do about it?
One of the simplest things you can try is a symlink from the actual location of the python2 executable to the location where npm is expecting it.
# create symlink
ln -s /usr/bin/python2 /usr/local/bin/python2
# test executability of symlink
/usr/local/bin/python2 --version
Once you've created that symlink, retry npm install in your project.
I am using webpack as the loader for my react app. node-sass is one of the loaders I am using. My operating system is Mac OSX High Sierra. I am currently using node v8.9.3. I cannot install it using npm but can using yarn. Here is the result when I use npm:
Unable to save binary /Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/vendor/darwin-x64-57 : { Error:
EACCES: permission denied, mkdir '/Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/Users/user/Documents/react/react.js-essential-training/node_modules/mkdirp/index.js:71:13)
at Function.sync (/Users/user/Documents/react/react.js-essential-training/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/scripts/install.js:111
:11)
at Object.<anonymous> (/Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/scripts/install.js:154:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/vendor' }
> node-sass#4.7.2 postinstall /Users/user/Documents/react/react.js-essential-training/node_modules/node-sass
> node scripts/build.js
Building: /Users/user/.nvm/versions/node/v8.9.3/bin/node /Users/user/Documents/react/react.js-essential-training/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 [ '/Users/user/.nvm/versions/node/v8.9.3/bin/node',
gyp verb cli '/Users/user/Documents/react/react.js-essential-training/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 node-gyp#3.6.2
gyp info using node#8.9.3 | darwin | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:13:12)\n at F (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:68:19)\n at E (/Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:80:29)\n at /Users/user/Documents/react/react.js-essential-training/node_modules/which/which.js:89:16\n at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/index.js:42:5\n at /Users/user/Documents/react/react.js-essential-training/node_modules/isexe/mode.js:8:5\n at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.9.3
gyp verb command install [ '8.9.3' ]
gyp verb install input version string "8.9.3"
gyp verb install installing version: 8.9.3
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.9.3
gyp verb build dir attempting to create "build" dir: /Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/user/Documents/react/react.js-essential-training/node_modules/node-sass/build'
gyp ERR! System Darwin 17.3.0
gyp ERR! command "/Users/user/.nvm/versions/node/v8.9.3/bin/node" "/Users/user/Documents/react/react.js-essential-training/node_modules/node-
gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/user/Documents/react/react.js-essential-training/node_modules/node-sass
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN react-essential#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.7.2 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.7.2 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! /Users/user/.npm/_logs/2017-12-26T06_42_24_432Z-debug.log
The reason why this is important because after I install node-sass using yarn if I update my project using npm the node-sass package is removed.
Sometimes there is an issue installing the binary of node-sass and you need to rebuild it for your architecture. However, I have seen errors like that and automagically is fixed by cleaning the cache of the packages:
npm cache clean
or
yarn cache clean
After running this command, try to install again your dependencies, if the error persists try to force the building of node-sass package
npm rebuild node-sass --force
or
yarn add node-sass --force
manual setup with zurb foundation 6 doesn't work.
my steps:
change to directory xampp/htdocs/test (test folder)
open command line and type: git clone https://github.com/zurb/foundation-sites-template projectname
*name should be the same (=projectname)
i installed the needed dependencies: cd projectname npm install
my result in command line:
C:\xampp\htdocs\test\projectname>npm install
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
> node-sass#3.13.1 install C:\xampp\htdocs\test\projectname\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-59_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-59_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass#3.13.1 postinstall C:\xampp\htdocs\test\projectname\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe C:\xampp\htdocs\test\projectname\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 'C:\\xampp\\htdocs\\test\\projectname\\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 node-gyp#3.6.2
gyp info using node#9.2.0 | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed stack: 'Error: not found: python2\n at getNotFoundError (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:13:12)\n at F (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:68:19)\n at E (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:80:29)\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:89:16\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\isexe\\index.js:42:5\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:166:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed python { Error: not found: python
gyp verb `which` failed at getNotFoundError (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (C:\xampp\htdocs\test\projectname\node_modules\which\which.js:80:29)
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\which\which.js:89:16
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\index.js:42:5
gyp verb `which` failed at C:\xampp\htdocs\test\projectname\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed stack: 'Error: not found: python\n at getNotFoundError (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:13:12)\n at F (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:68:19)\n at E (C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:80:29)\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\which\\which.js:89:16\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\isexe\\index.js:42:5\n at C:\\xampp\\htdocs\\test\\projectname\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:166:21)',
gyp verb `which` failed code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
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:\xampp\htdocs\test\projectname\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\xampp\htdocs\test\projectname\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\xampp\htdocs\test\projectname\node_modules\node-gyp\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:166:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xampp\\htdocs\\test\\projectname\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\xampp\htdocs\test\projectname\node_modules\node-sass
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN The package gulp-autoprefixer is included as both a dev and production dependency.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.13.1 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\......\AppData\Roaming\npm-cache\_logs\2017-11-21T19_06_03_400Z-debug.log
more information:
git for windows 2.15.0
node js v9.2.0
*sorry for repeating posts - its my first one here
node-sass does not provide binaries for all environments.
You have to run npm i -g --production windows-build-tools (which is just npm install --global --production windows-build-tools)
https://github.com/felixrieseberg/windows-build-tools will install the dependencies for node-gyp like Python 2 to build node-sass from the source code.
node-gyp is a cross-platform command-line tool written in Node.js for
compiling native addon modules for Node.js. It bundles the gyp project
used by the Chromium team and takes away the pain of dealing with the
various differences in build platforms. It is the replacement to the
node-waf program which is removed for node v0.8. If you have a native
addon for node that still has a wscript file, then you should
definitely add a binding.gyp file to support the latest versions of
node.
https://github.com/nodejs/node-gyp
I'm trying to start JHipster Registry by building it from source and for that I'm following Matt Raible's tutorial.
But I'm getting an error with exit code 1 and the following is the generated stack trace.
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents#1.1.1: The platform "win32" is incompatible with this module.
info "fsevents#1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "angular2-cookie#1.2.6" has incorrect peer dependency "#angular/common#^2.0.0".
warning "angular2-cookie#1.2.6" has incorrect peer dependency "#angular/core#^2.0.0".
warning "ng2-translate#4.2.0" has incorrect peer dependency "#angular/core#^2.0.0".
warning "ng2-translate#4.2.0" has incorrect peer dependency "#angular/http#^2.0.0".
[4/4] Building fresh packages...
[1/4] ⢀ node-sass: could not find "C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE". checking
[-/4] ⢀ waiting...
[3/4] ⠠ phantomjs-prebuilt: Receiving...
[-/4] ⠠ waiting...
error D:\JHipster\jhipster-microservices-example\registry\node_modules\node-
sass: Command failed.
Exit code: 1
Command: C:\WINDOWS\system32\cmd.exe
Arguments: /d /s /c node scripts/build.js
Directory: D:\JHipster\jhipster-microservices-example\registry\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe D:\JHipster\jhipster-microservices-example\registry\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:\\JHipster\\jhipster-microservices-example\\registry\\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 node-gyp#3.6.0
gyp info using node#8.3.0 | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:80:29)
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\which\which.js:89:16
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\isexe\index.js:42:5
gyp verb `which` failed at D:\JHipster\jhipster-microservices-example\registry\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE
gyp verb check python version `C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.5.4\r\n"
gyp verb could not find "C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE". checking python launcher
gyp verb could not find "C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\Srikar\AppData\Local\Programs\Python\Python35\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\JHipster\jhipster-microservices-example\registry\node_modules\node-gyp\lib\configure.js:482:19)
gyp ERR! stack at PythonFinder.<anonymous> (D:\JHipster\jhipster-microservices-example\registry\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at D:\JHipster\jhipster-microservices-example\registry\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.16251
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\JHipster\\jhipster-microservices-example\\registry\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\JHipster\jhipster-microservices-example\registry\node_modules\node-sass
gyp ERR! node -v v8.3.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Steps performed:
1) Download the JHipster Registry from Github as a zip and Unzip it.
2) Navigate to that directory in the Windows PowerShell and run yarn or yarn install.
I'm new to JHipster. I'm not sure whether the issue is with sass or python2 or other. I'm looking for detailed information regarding the issue and how to solve it?
Node Version: 8.3.0
Power Shell Version: 5.1.16251.0
OS ->
Edition: Windows 10 Enterprise Insider Preview
Version: 1703
OS Build: 16251.1002
[As far as I can understand,
i) Warning with fsevents is because I'm using Windows x-64 and fsevents is mainly for Mac to monitor file systems. Is that correct?
ii) Is the registry using Angular 2 for the front-end design? (even though you can build Angular 4 apps with JHispter)
iii) When building fresh packages, node_sass complains it cannot find the python.exe file but I've checked the folder but the file exists. I have python3.5.4 in the path too.
In the subsequent steps, is it looking for python2 because it didn't find python3? If JHipster is a SpirngBoot(back-end) + Angular(front-end) application then where will the python be used? Can we write mild python scripts too?]
i) correct you can ignore this warning
ii) the registry is an app generated by JHipster (you can see its options in .yo-rc.json file) and uses angular 4 for its UI
iii) python is only used for node building not by the app runtime, here the issue is with node-sass that cannot be built and it's an environment issue:
node-gyp requires python 2.x to build native module like node-sass and you have python 3.x, please re-install
JHipster recommends using an LTS version of Node currently 6.x, you're using latest currently 8.x, please consider re-installing.
Now, the bad news is that you are on Windows; best platforms for nodejs are Linux and macOS, Matt Raible is on macOS so he did not encounter all your issues. It's possible that even with fixing your python and nodejs versions node-gyp may fail building native modules. If this happens you have few alternatives:
use jhipster-devbox
don't use sass and select a tutorial that doesn't use it
install MS build tools
I just downgrade NodeJS to 6.x and things started to work out. So, please, try downgrade it and recompile using: yarn.
I've installed latest Node JS ( v 8.1.0 ), Ionic and Cordova then tried to install node_modules using npm install command in ionic demo tab project created using ionic start myApp tabs and I got the following error. I'm using Windows 10 Pro. I have tried lot but yet to resolve the worry. any help would be greatly appreciated.
npm install
✖ Running command - failed!
[ERROR] An error occurred while running npm install (exit code 1):
npm WARN prefer global node-gyp#3.6.2 should be installed with -g
> node-sass#4.5.0 install E:\Hybrid Project Locker\NFB\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.0/win32-x64-57_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
> fsevents#1.1.1 install E:\Hybrid Project Locker\NFB\node_modules\fsevents
> node install
> node-sass#4.5.0 postinstall E:\Hybrid Project Locker\NFB\node_modules\node-sass
> node scripts/build.js
Building: C:\Program Files\nodejs\node.exe E:\Hybrid Project Locker\NFB\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldf
lags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli 'E:\\Hybrid Project Locker\\NFB\\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 node-gyp#3.6.2
gyp info using node#8.1.0 | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python2 { Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed at getNotFoundError (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed python { Error: not found: python
gyp verb `which` failed at getNotFoundError (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\Hybrid Project Locker\NFB\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\Hybrid Project Locker\NFB\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
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 (E:\Hybrid Project Locker\NFB\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (E:\Hybrid Project Locker\NFB\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at E:\Hybrid Project Locker\NFB\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.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Hybrid Project Locker\\NFB\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--li
bsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\Hybrid Project Locker\NFB\node_modules\node-sass
gyp ERR! node -v v8.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN #angular/http#2.4.10 requires a peer of #angular/platform-browser#2.4.10 but none was installed.
npm WARN #ionic/cli-plugin-ionic-angular#1.3.0 requires a peer of #ionic/app-scripts#^1.3.7 but none was installed.
npm WARN cordova-ios#4.4.0 had bundled packages that do not match the required version(s). They have been replaced with non-bundled versions.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.5.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.5.0 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\Anoop M\AppData\Roaming\npm-cache\_logs\2017-06-10T00_37_25_356Z-debug.log
Try with Node.js v6 and it should work. This is because Node Sass v4.5.0 doesn't support Node.js v8
You can check the supported environments for Node Sass v4.5.0 here: https://github.com/sass/node-sass/releases/tag/v4.5.0
Change to node-sass 4.5.3 as it fixed error installation on node 8 https://github.com/sass/node-sass/releases
Remove the (webpack, sass-loader/less-loader and node-sass) entry in package.json.
Delete the node_modules folder
install with "npm install sass-loader node-sass webpack".
This worked for me.
Try to run this command:
npm install --unsafe-perm node-sass