You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing with npm install execSync I got Cannot find module './build/Release/shell' error.
I had to go into the node_modules directory and build it myself passing the flag --python python2 to the node-gyp rebuild command.
Digging a little on the net I've found that this is affecting only guys that are using Python 3.x as their default python executable ( see nodejs/node-gyp#526 and atom/atom#1933 ). To fix this issue ( call it a workaround) you should do this on the project you're having this issue:
npm config set python /usr/bin/python2.7
npm install
Make sure that you're having Python 2 installed as a package in your distro ( my solution is based on Ubuntu 14.10 ).
Besides that, the most annoying thing about that bug is that it appears out of a sudden. Yesterday everything worked perfectly. Can everyone come up with an idea for an explanation?
@scheffield are you sure? For me it worked also two days ago on Arch Linux where I did my new dev server (same error, same fix and now working awesome).
Try to remove your node_modules folder after you set the npm config for python :)
Finally make sure (obviously) that python 2 is installed and running on your machine...
We resolved this a short time ago. Turned out my coworker who was hitting this problem had a rogue, custom build of make in his path. Sorry for the confusion.
I am still getting the same error even after using sudo npm install exec-sync
The error is:
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module './build/Release/shell'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/sabreena/.nvm/v0.10.24/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Activity
Kikobeats commentedon Oct 1, 2014
I have the same problem!
The problem is that your system doesn't make the build:
In my case the problem appear today, yesterday all worked fine and the repository hasn't been updated. ¿?
Kikobeats commentedon Oct 1, 2014
Hi,
In my case:
node-gyp rebuilddamm!
bdavidxyz commentedon Oct 10, 2014
I had same problem than @olanod. Solved by simple 'node-gyp rebuild'
n8agrin commentedon Oct 27, 2014
We hit this too. There was no way we could fix. Running node-gyp did not fix the problem.
mrfelton commentedon Nov 26, 2014
Also affects me
julianxhokaxhiu commentedon Nov 28, 2014
Digging a little on the net I've found that this is affecting only guys that are using Python 3.x as their default python executable ( see nodejs/node-gyp#526 and atom/atom#1933 ). To fix this issue ( call it a workaround) you should do this on the project you're having this issue:
npm config set python /usr/bin/python2.7 npm installMake sure that you're having Python 2 installed as a package in your distro ( my solution is based on Ubuntu 14.10 ).
Have fun :)
scheffield commentedon Jan 9, 2015
@julianxhokaxhiu unfortunately, this doesn't solved my problem.
Besides that, the most annoying thing about that bug is that it appears out of a sudden. Yesterday everything worked perfectly. Can everyone come up with an idea for an explanation?
julianxhokaxhiu commentedon Jan 10, 2015
@scheffield are you sure? For me it worked also two days ago on Arch Linux where I did my new dev server (same error, same fix and now working awesome).
Try to remove your
node_modulesfolder after you set thenpm configfor python :)Finally make sure (obviously) that python 2 is installed and running on your machine...
n8agrin commentedon Jan 12, 2015
We resolved this a short time ago. Turned out my coworker who was hitting this problem had a rogue, custom build of make in his path. Sorry for the confusion.
cperryk commentedon Feb 3, 2015
Also getting this issue, and I'm running Python 2.7.6.
Running
node-gyp rebuilddoesn't work for me (command not found).This also did not fix the issue:
ccgroupdev commentedon Feb 10, 2015
Also running in this issue. I have tried all of the suggestions above and still no luck.
Any other suggestions? Much appreciated.
sabreena commentedon Feb 18, 2015
I am facing the same issue. Tried the above suggestions but of no help.
I am using OSX 10.9.4. Need help urgently. That will be much appreciated.
julianxhokaxhiu commentedon Feb 18, 2015
I would suggest to use exec-sync from now on, compatible with nodejs 0.12.x and anyway it doesn't depend on libc, python or stuff like this :)
sabreena commentedon Feb 19, 2015
I am still getting the same error even after using sudo npm install exec-sync
The error is:
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module './build/Release/shell'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/sabreena/.nvm/v0.10.24/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Any other solution to it?
julianxhokaxhiu commentedon Feb 19, 2015
Clean reinstall NPM and remove all
node_modulesfolders. Then just run againnpm install:)webpolis commentedon Mar 22, 2015
No solution works.
megatolya commentedon Mar 22, 2015
No solution works to me too
sgarbesi commentedon Mar 23, 2015
No solution here either.
webpolis commentedon Mar 23, 2015
Only solution is switching to https://www.npmjs.com/package/exec-sync
sgarbesi commentedon Mar 23, 2015
@webpolis Using a 3rd party library,
grunt-faviconsotherwise I would. Still looking, let you know if I find anything.sgarbesi commentedon Mar 23, 2015
@webpolis Wound up just forking and updating manually.
luishdez commentedon Mar 31, 2015
These are some alternatives:
cphyc commentedon May 19, 2015
It may be worth noting that you can have issues using node v0.12 instead of v0.10 for example, try downgrading it using
nvm.aclowes commentedon Nov 10, 2015
Easily solved on a Mac: run
sudo maketo cause Xcode to prompt you to agree to the license terms, then runnpm install execSyncagain.fmquaglia commentedon Feb 5, 2016
@aclowes' solution worked for me. Thanks pal! 👍
rvergis commentedon Feb 5, 2016
@aclowes thanks, that worked for us.
julianxhokaxhiu commentedon Sep 16, 2018
Time to close this @mgutz ?