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

npm install on windows 7 python2 not found error and node-sass@3.13.1 error #317

Closed
benny-ben opened this issue Jan 15, 2018 · 27 comments

Comments

@benny-ben
Copy link
Contributor

commented Jan 15, 2018

Before I write all, I'd like to say that before the update everything worked well; while updating node from version 7.2.1 to version 9.4.0 and npm from version 5.5.1 to version 5.6.0 in Windows 7 (64-bit) using the installer (https://nodejs.org/en/download/) and installing globally gulp-cli version 2.0.0, as far as npm install starts from the JointsWP folder I get the following error:

$ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: รฐ  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> uws@0.14.5 install C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> node-sass@3.13.1 install C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\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.4.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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\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:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\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:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder. (C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:166:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Bob\\Dropbox\\Development\\vhosts\\mongoose-project\\vanilla\\themes\\JointsWP\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
gyp ERR! node -v v9.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
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 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\Bob\AppData\Roaming\npm-cache\_logs\2018-01-13T10_31_53_892Z-debug.log

Then I proceed installing windows-build-tools and node-gyp this way:

npm --add-python-to-path='true' --debug install --global windows-build-tools
npm install --global node-gyp

I delete the node_modules folder and package-lock.json file and run npm install again but I get the following error:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'rm',
1 verbose cli   'gulp',
1 verbose cli   '--save-dev' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 verbose npm-session f41010a2c6221fcb
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly install loadIdealTree
8 silly install cloneCurrentTreeToIdealTree
9 silly install loadShrinkwrap
10 silly uninstall loadAllDepsIntoIdealTree
11 silly install loadAllDepsIntoIdealTree
12 http fetch GET 304 https://registry.npmjs.org/gulp-sass 314ms (from cache)
13 silly pacote range manifest for gulp-sass@^2.0.1 fetched in 350ms
14 http fetch GET 304 https://registry.npmjs.org/node-sass 61ms (from cache)
15 silly pacote range manifest for node-sass@^3.4.2 fetched in 66ms
... too long ...
89 silly addBundled read tarball
90 silly cleanup remove extracted module
... too long ...
806 silly currentTree jointswp-sass@5.0.0 ... too long ...
807 silly idealTree jointswp-sass@5.0.0 ... too long ...
808 silly install generateActionsToTake
809 silly diffTrees action count 147 ... too long ...
955 silly diffTrees add node-sass@3.13.1
956 silly diffTrees add gulp-sass@2.3.2
957 silly decomposeActions action count 948 ... too long ...
1905 silly decomposeActions refresh-package-json gulp-sass@2.3.2
1906 silly install executeActions
1907 silly doSerial global-install 948
... too long ...
1999 silly pacote gulp-sass@https://registry.npmjs.org/gulp-sass/-/gulp-sass-2.3.2.tgz extracted to C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\.staging\gulp-sass-a933052a by content address 205ms
... too long ...
2008 silly pacote node-sass@https://registry.npmjs.org/node-sass/-/node-sass-3.13.1.tgz extracted to C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\.staging\node-sass-9bcaf5e7 by content address 482ms
... too long ...
2010 silly doReverseSerial unbuild 948
2011 silly doSerial remove 948
2012 silly doSerial move 948
2013 silly doSerial finalize 948
... too long ...
2159 silly finalize C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
2160 silly finalize C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\gulp-sass
2161 silly doParallel refresh-package-json 948
... too long ...
2262 silly doParallel preinstall 948
... too long ...
2323 silly preinstall node-sass@3.13.1
2324 info lifecycle node-sass@3.13.1~preinstall: node-sass@3.13.1
2325 silly preinstall gulp-sass@2.3.2
2326 info lifecycle gulp-sass@2.3.2~preinstall: gulp-sass@2.3.2
2327 silly doSerial build 948
... too long ...
2566 silly install node-sass@3.13.1
2567 info lifecycle node-sass@3.13.1~install: node-sass@3.13.1
2568 verbose lifecycle node-sass@3.13.1~install: unsafe-perm in lifecycle true
2569 verbose lifecycle node-sass@3.13.1~install: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass\node_modules\.bin;C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\.bin;C:\Users\Bob\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\Program Files\nodejs;C:\Users\Bob\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
2570 verbose lifecycle node-sass@3.13.1~install: CWD: C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
2571 silly lifecycle node-sass@3.13.1~install: Args: [ '/d /s /c', 'node scripts/install.js' ]
2572 silly lifecycle node-sass@3.13.1~install: Returned: code: 0  signal: null
2573 silly install gulp-sass@2.3.2
2574 info lifecycle gulp-sass@2.3.2~install: gulp-sass@2.3.2
2575 silly doSerial postinstall 948
... too long ...
2636 silly postinstall node-sass@3.13.1
2637 info lifecycle node-sass@3.13.1~postinstall: node-sass@3.13.1
2638 verbose lifecycle node-sass@3.13.1~postinstall: unsafe-perm in lifecycle true
2639 verbose lifecycle node-sass@3.13.1~postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass\node_modules\.bin;C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\.bin;C:\Users\Bob\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\Program Files\nodejs;C:\Users\Bob\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
2640 verbose lifecycle node-sass@3.13.1~postinstall: CWD: C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
2641 silly lifecycle node-sass@3.13.1~postinstall: Args: [ '/d /s /c', 'node scripts/build.js' ]
2642 silly lifecycle node-sass@3.13.1~postinstall: Returned: code: 1  signal: null
2643 info lifecycle node-sass@3.13.1~postinstall: Failed to exec postinstall script
2644 verbose unlock done using C:\Users\Bob\AppData\Roaming\npm-cache\_locks\staging-63ae421f88b49207.lock for C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\.staging
2645 silly saveTree jointswp-sass@5.0.0 ... too long ...
2646 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
2647 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
2648 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
2648 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
2648 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
2648 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2649 verbose stack Error: node-sass@3.13.1 postinstall: `node scripts/build.js`
2649 verbose stack Exit status 1
2649 verbose stack     at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
2649 verbose stack     at EventEmitter.emit (events.js:160:13)
2649 verbose stack     at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2649 verbose stack     at ChildProcess.emit (events.js:160:13)
2649 verbose stack     at maybeClose (internal/child_process.js:943:16)
2649 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
2650 verbose pkgid node-sass@3.13.1
2651 verbose cwd C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP
2652 verbose Windows_NT 6.1.7601
2653 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "rm" "gulp" "--save-dev"
2654 verbose node v9.4.0
2655 verbose npm  v5.6.0
2656 error code ELIFECYCLE
2657 error errno 1
2658 error node-sass@3.13.1 postinstall: `node scripts/build.js`
2658 error Exit status 1
2659 error Failed at the node-sass@3.13.1 postinstall script.
2659 error This is probably not a problem with npm. There is likely additional logging output above.
2660 verbose exit [ 1, true ]

So I found out that the gulp-sass: ^2.0.1 installation installs node-sass@3.13.1 as well, but I'm frightened that node-sass@3.13.1 is not supported by node 8 and further versions. So I tried to indicate gulp-sass: ^3.0.0 in the package.json file and run npm install again as follows:

$ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: ð  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> uws@0.14.5 install C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> node-sass@4.7.2 install C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-59_binding.node
Download complete
Binary saved to C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass\vendor\win32-x64-59\binding.node
Caching binary to C:\Users\Bob\AppData\Roaming\npm-cache\node-sass\4.7.2\win32-x64-59_binding.node

> node-sass@4.7.2 postinstall C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass
> node scripts/build.js

Binary found at C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\node-sass\vendor\win32-x64-59\binding.node
Testing binary
Binary is fine

> gifsicle@3.0.4 postinstall C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\gifsicle
> node lib/install.js

  â gifsicle pre-build test passed successfully

> jpegtran-bin@3.2.0 postinstall C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\jpegtran-bin
> node lib/install.js

  â jpegtran pre-build test passed successfully

> optipng-bin@3.1.4 postinstall C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\optipng-bin
> node lib/install.js

  â optipng pre-build test passed successfully
npm WARN rollback Rolling back node-pre-gyp@0.6.39 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\node_modules\fsevents\node_modules'

> jointswp-sass@5.0.0 postinstall C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP
> npm run build


> jointswp-sass@5.0.0 build C:\Users\Bob\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP
> gulp

[17:08:47] Using gulpfile ~\Dropbox\Development\vhosts\mongoose-project\vanilla\themes\JointsWP\gulpfile.js
[17:08:47] Starting 'default'...
[17:08:47] Starting 'styles'...
[17:08:47] Starting 'scripts'...
[17:08:47] Starting 'images'...
[17:08:53] Finished 'styles' after 6.39 s
[17:08:53] gulp-imagemin: Minified 0 images
[17:08:53] Finished 'images' after 6.55 s
[17:08:58] Finished 'scripts' after 11 s
[17:08:58] Finished 'default' after 11 s
npm notice created a lockfile as package-lock.json. You should commit this file.
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"})

added 1203 packages in 171.173s

Now everything seems ok

@rcsmelicio

This comment has been minimized.

Copy link

commented Feb 13, 2018

Thank you my friend!!

@garrett-eclipse

This comment has been minimized.

Copy link
Collaborator

commented Feb 13, 2018

Thanks @benny-ben if I understand properly you're indicating that the gulp-sass version set in package.json needs to be bumped to 3.0?
Was there anything else? Just making sure I understand so can make a PR properly

@benny-ben

This comment has been minimized.

Copy link
Contributor Author

commented Feb 14, 2018

Yes @garrett-eclipse, as far as the theme is concerned I modified just:

"gulp-sass": "^3.0.0"

Thank you and @JeremyEnglert, because JointsWP is a wonderful theme!

@garrett-eclipse

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

Thanks @benny-ben I created PR #328 to resolve this

@kuldeep43207

This comment has been minimized.

Copy link

commented May 16, 2018

i have the same error, but not able to resolving by this method.

@garrett-eclipse

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2018

Hi @kuldeep43207 can you spawn a new ticket for your issue and provide the console output you receive and I'll take a look. This ticket will be closed upon merging the PR so don't want yours to be overlooked. Thanks

sumittechs added a commit to sumittechs/angular-starter-kit that referenced this issue Jul 23, 2018
^2.3.2 is outdated.Please find the link for more information JeremyEnglert/JointsWP#317
@Santosh-Lodhi

This comment has been minimized.

Copy link

commented Aug 6, 2018

Hi,
I have same issue in windows 10, not resolved with given above approach - creating new project
ng new myApp with
dev environment

  • node V8.11.3
  • npm 6.3.0
  • Angular CLI: 6.0.8
  • OS: win32 x64
  • typescript 2.7.2

Building: C:\Program Files\nodejs\node.exe C:\POC\testApp\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:\POC\testApp\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.7.0
gyp info using node@8.11.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:\POC\testApp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\POC\testApp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\POC\testApp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\POC\testApp\node_modules\which\which.js:89:16
gyp verb which failed at C:\POC\testApp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\POC\testApp\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 (C:\POC\testApp\node_modules\which\which.js:13:12)
gyp verb which failed at F (C:\POC\testApp\node_modules\which\which.js:68:19)
gyp verb which failed at E (C:\POC\testApp\node_modules\which\which.js:80:29)
gyp verb which failed at C:\POC\testApp\node_modules\which\which.js:89:16
gyp verb which failed at C:\POC\testApp\node_modules\isexe\index.js:42:5
gyp verb which failed at C:\POC\testApp\node_modules\isexe\windows.js:36:5
gyp verb which failed at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb which failed stack: 'Error: not found: python2\n at getNotFoundError (C:\POC\testApp\node_mod

@garrett-eclipse

This comment has been minimized.

Copy link
Collaborator

commented Aug 9, 2018

Hi @Santosh-Lodhi thanks for spawning a new ticket as your issue is unrelated. I'll take a look at update you there. Cheers

@juliacheperis13

This comment has been minimized.

Copy link

commented Aug 12, 2018

Thank you very much ! it worked

@yvinap

This comment has been minimized.

Copy link

commented Aug 20, 2018

I faced similar issue.
npm: 5.6.0
node: 8.1..4
react:^16.4.2

This post helped me to resolve the issue. I followed the steps as below

unistall and reinstall node (from control panel >>programs)
npm rebuild node-sass
npm --add-python-to-path='true' --debug install --global windows-build-tools
npm install --global node-gyp
npm nstall

Thanks very much.

@dhaniksahni

This comment has been minimized.

Copy link

commented Aug 24, 2018

Thank you. it is working for me.

@BakariMorris

This comment has been minimized.

Copy link

commented Sep 7, 2018

Thank you! This resolved my issue.

ran npm --add-python-to-path='true' --debug install --global windows-build-tools
deleted node_modules
deleted package-lock,json
wrote "gulp-sass": "^3.0.0", in package.json
ran npm-install

@HussainMubarak24

This comment has been minimized.

Copy link

commented Sep 23, 2018

@BakariMorris Many thanks, dude, I have been searching for a solution like 4 days, and you saved me. Cheers!

@mintymatt

This comment has been minimized.

Copy link

commented Oct 1, 2018

+1 Thank-you for the solution! Perhaps change the status from open?

JeremyEnglert pushed a commit that referenced this issue Oct 14, 2018
Jeremy Englert
Bumping Gulp-Sass version to resolve #317
@theverdiktus

This comment has been minimized.

Copy link

commented Nov 12, 2018

npm --add-python-to-path='true' --debug install --global windows-build-tools

THANKS!!!! worked like a charm!!!!

@bootstapper123

This comment has been minimized.

Copy link

commented Nov 15, 2018

i had similar failure during bootstrap new project creation.

i followed below steps (given by yvinap on Aug 20) but still getting the error. please help.

unistall and reinstall node (from control panel >>programs)
npm rebuild node-sass
npm --add-python-to-path='true' --debug install --global windows-build-tools
npm install --global node-gyp
npm install -g grunt bower
npm install -g gulp bower
npm install -g bootstrap-cli
bootstrap new
? What's the project called? (no spaces) Chapter1
? Which template would you like to use? Basic Template: includes a Sass compiler

gyp verb check python checking for Python executable "C:\Program Files (x86)\Python37-32\python.exe" in the PATH
gyp verb which succeeded C:\Program Files (x86)\Python37-32\python.exe C:\Program Files (x86)\Python37-32\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Program Files (x86)\Python37-32\python.exe -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:289:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Windows\system32\Chapter1\node_modules\grunt-sass\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Windows\system32\Chapter1\node_modules\grunt-sass\node_modules\node-sass
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1

@bootstapper123

This comment has been minimized.

Copy link

commented Nov 15, 2018

i have installed
python-3.7.1.exe
Git-2.19.1-64-bit.exe
node-v10.13.0-x64.msi
bootstrap-4.1.3.zip

@garrett-eclipse

This comment has been minimized.

Copy link
Collaborator

commented Nov 15, 2018

Hi @bootstapper123
This repo is for JointsWP development. From the looks of your command output you're working with bootstrap-cli. To get support for Bootstrap please open an issue on their github repo here;
https://github.com/twbs/bootstrap/issues
Cheers

@bootstapper123

This comment has been minimized.

Copy link

commented Nov 15, 2018

Thanks Garrett, i have started a new post on bootstrap/issues

twbs/bootstrap#27674

@kirlled

This comment has been minimized.

Copy link

commented Dec 1, 2018

For me the solution was to remove the file: package-lock.json

@Suyashjc

This comment has been minimized.

Copy link

commented Dec 4, 2018

the solution for me was that i ran this
npm install @ionic/app-scripts@latest --save-dev
later in index.html add this in the body

<script src="build/vendor.js"></script>

check this for ref
https://github.com/ionic-team/ionic-app-scripts/releases/tag/v2.0.0

@Lacika1981

This comment has been minimized.

Copy link

commented Jan 17, 2019

In my json file the gulp-sass was ^3.1.0 and failed to install. Changed to ^3.0.0 and solved the problem

@mjepkoech

This comment has been minimized.

Copy link

commented Jan 21, 2019

Worked like a charm. Thank you.

@delrosariotanny

This comment has been minimized.

Copy link

commented Mar 20, 2019

Thank you! This resolved my issue.

ran npm --add-python-to-path='true' --debug install --global windows-build-tools
deleted node_modules
deleted package-lock,json
wrote "gulp-sass": "^3.0.0", in package.json
ran npm-install

this solved it for me. many thanks!

@tomihawk

This comment has been minimized.

Copy link

commented May 26, 2019

I ran into this problem and after none of the solutions here worked (or on any other issue threads discussing this same problem) I found something that worked for me so thought I'd share since this is page ranks high in google.

node-sass binaries are built for most of the common platforms so there should be no need to compile it if you're just using it as a dependency. Line 8 and 9 of the OP show that it's trying to download a binary from github and it fails with a 404 error. The fallback is to build the binary and that's what it needs Python and other compilation tools for. If you fix the initial problem then you don't need to install all those extra build tools. For me, installing them didn't even work because I started to get compilation errors in the c code!

I hadn't done a node upgrade or anything. I was setting up node on a new development machine (10.15.3 lts) and I'd been having spotty wifi all day so I think when it tried to download this binary it failed. But then all subsequent tries after wifi was restored also failed for some reason. It had created an empty folder in the npm cache (...\cache\node-sass\x.xx.x) with the name of the version number it was trying to download but it was empty. Maybe this is what confused it on subsequent tries.

"npm cache verify" didn't help. "npm cache clean --force" didn't help (that doesn't seem to clean out ...\cache\node-sass at all. I had to delete the entire cache folder (although I now think just deleting ...\cache\node-sass would work.

The next time I ran npm install it downloaded the binary and everything worked. Nothing looked for python or tried to compile anything.

Hope this saves someone installing python and windows-dev-tools and node-gyp and all that bloat for no reason.

@dssagar93

This comment has been minimized.

Copy link

commented Jul 17, 2019

Been looking into the issue since last 6 hours and this was the solution. Thanks benny-ben !

@hmuhdkamran

This comment has been minimized.

Copy link

commented Jul 25, 2019

I have the same kind of issue, and this resolve.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.