0

All, I am facing below issue when I execute npm install while setting up new habitat instance by following the steps as detailed in https://github.com/Sitecore/Habitat/wiki/01-Getting-Started

Can you please let me know on what is the issue?

Issue is as below:

gyp verb which failed Error: not found: python2 gyp verb which failed at getNotFoundError (C:\projects\Habitat\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\projects\Habitat\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\projects\Habitat\node_modules\which\which.js:80:29) gyp verb which failed at C:\projects\Habitat\node_modules\which\which.js:89:16 gyp verb which failed at C:\projects\Habitat\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\projects\Habitat\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:\projects\Habitat\node_modules\which\which.js:13:12) gyp verb which failed at F (C:\projects\Habitat\node_modules\which\which.js:68:19) gyp verb which failed at E (C:\projects\Habitat\node_modules\which\which.js:80:29) gyp verb which failed at C:\projects\Habitat\node_modules\which\which.js:89:16 gyp verb which failed at C:\projects\Habitat\node_modules\isexe\index.js:42:5 gyp verb which failed at C:\projects\Habitat\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:\projects\Habitat\node_modules\which\which.js:13:12)\n at F (C:\projects\Habitat\node_modules\which\which.js:68:19)\n at E (C:\projects\Habitat\node_modules\which\which.js:80:29)\n at C:\projects\Habitat\node_modules\which\which.js:89:16\n at C:\projects\Habitat\node_modules\isexe\index.js:42:5\n at C:\projects\Habitat\node_modules\isexe\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)', gyp verb which failed code: 'ENOENT' }

2 Answers 2

0

I'm not too familiar with the Habitat setup, but it looks like a common issue with SASS compilation.

It requires an OS/system-dependent binding file, which I believe it first tries to download from Github, but if that fails (e.g. firewalls on company network etc.) it tries to build the needed version - which requires Python 2 to be installed and available on PATH.

You can download Python here (choose the 2.x.x version): https://www.python.org/downloads/

Alternative

You can also download the needed binding file yourself from the releases on Github: https://github.com/sass/node-sass/releases

The logs should tell you which version your system needs. Then copy the file to C:\Users\<username>\AppData\Roaming\npm-cache\node-sass\<version>\. Alternatively you can specify the path to the file with an environment variable SASS_BINARY_NAME.

0
0

I got the same error and resolved it by installing/re-installing Node.js. https://nodejs.org/en/download After successful installation 0pen CMD in Administrator mode and Go to your project directory to run npm install command. Make sure the Path/npm install should be where the gulp-config.js file exist.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.