frontend-united / generator-drupal-theme

A yeoman generator to start the foundation of any Drupal theme.
38 stars 15 forks source link

Getting error while using yo aurora command. #20

Open sabreena opened 9 years ago

sabreena commented 9 years ago

The following error I get when try to use yo aurora or yo drupal-theme, I am using OS X 10.9.5. 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 help would be much appreciated.

marcvangend commented 9 years ago

I had the same issue and I was able to solve it by running node-gyp rebuild.

Unfortunately that sounds easier than it is, because depending on your system, node-gyp rebuild may also throw errors at you. (It did in my case...) I'm not 100% what made me succeed in the end, but some things to look out for are:

rocksoup commented 9 years ago

I am also experiencing this error:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

I was unable to resolve this using npm install -g node-gyp

I am using OS X 10.10.2

madalinignisca commented 9 years ago

Something similar:

module.js:338
    throw err;
    ^
Error: Cannot find module './build/Release/shell'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

OSX 10.10.2 homebrew node 0.12.0 npm 2.7.3 Apple LLVM version 6.0

4aficiona2 commented 9 years ago

Is still an issue. I get the same error:

/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:579
    throw e;
          ^
Error: Cannot find module './build/Release/shell'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
my libs / modules / generators version
Mac OS X 10.9.5
python 2.7.9
node 0.12.2
npm 2.9.0
yo 1.4.6
generator-drupal-theme 0.1.6

Also added /usr/bin/python2.7 to npm config with npm config set python /usr/bin/python2.7. See execSync issue.

I uninstalled generator-drupal-theme and reinstalled it but the installation process fails.

$ sudo npm install -g yo generator-drupal-theme

> execSync@1.0.2 install /usr/local/lib/node_modules/generator-drupal-theme/node_modules/execSync
> node install.js

__[execsync v1.0.2] Attempting to compile native extensions.__
__[execSync v1.0.2]__
    __Native code compile failed!!__
/usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js

> yo@1.4.6 postinstall /usr/local/lib/node_modules/yo
> yodoctor

Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory

Native code compilation of execSync failed!!

Did someone solve this issue? Also checked execSync issue but could not yet solve the problem. Still can't build a new subtheme.

woogieo commented 9 years ago

Has anyone else had any Joy resolving this ? Or is there a plan to resolve the execSync ?

Being primararly a wordpress front end dev using Roots.io and familiar with package manager projects. I thought this would be the perfect Drupal alternative.

I am losing the will to live trying to figure out how this works. I've had all the errors above. I've tried re-installing node-gyp, npm, node, yo, All my node modules. Re-installed my whole drupal package + my local enviroment. Tried setting config PATH for python. Tried changing the usage on execSync but thats a whole new bag of problems.

Here is my version of the dreaded error that seems to be plauging a lot of people.


events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Cannot find module './build/Release/shell'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/usr/local/lib/node_modules/generator-drupal-theme/node_modules/execSync/index.js:30:11)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Sorry if this sounds like one big moan.

fsnet commented 9 years ago

Workaround:

Works with:

soniCaH commented 9 years ago

Fails with

fsnet commented 9 years ago

Where is your Yeoman located? It seems to be necessary to uninstall the global yo in /usr/local/bin and install it via nvm instead.

Am 08.06.2015 um 12:43 schrieb Kevin Van Ransbeeck notifications@github.com:

Fails with

OS X 10.10.3 Python 2.7.6 Node 0.10.38 NPM 2.11.0 Yo 1.4.7 — Reply to this email directly or view it on GitHub https://github.com/frontend-united/generator-drupal-theme/issues/20#issuecomment-109946529.

soniCaH commented 9 years ago

install it via nvm instead How do I do this? I uninstalled yo globally, did a "nvm use 0.10" and then installed yeoman again, is this correct or?

fsnet commented 9 years ago

Assumed you reinstalled yo with parameter -g. My installation: /Users/me/.nvm/v0.10.38/bin/node /Users/me/.nvm/v0.10.38/bin/npm /Users/me/.nvm/v0.10.38/bin/yo

Am 08.06.2015 um 13:12 schrieb Kevin Van Ransbeeck notifications@github.com:

install it via nvm instead How do I do this? I uninstalled yo globally, did a "nvm use 0.10" and then installed yeoman again, is this correct or?

— Reply to this email directly or view it on GitHub https://github.com/frontend-united/generator-drupal-theme/issues/20#issuecomment-109953148.

woogieo commented 9 years ago

Sorted, I don't think I installed NVM properly. dough. I can confirm reverting to Node v0.10 works Thanks and sorry for my rant earlier. Great theme!

abenamer-zz commented 9 years ago

Ok, I just went through this rabbit hole. This really does work. Here are my version numbers:

Mac OS X 10.10.4 node v0.10.39 Python 2.7.10 npm 2.12.1 yo 1.4.7

I highly recommend doing the NPM installation with brew. I used

HOMEBREW_VERSION: 0.9.5 I used these commands to get a version of node that matched fsnet's workaround:

brew tap homebrew/boneyard brew install homebrew/versions/node010 --without-npm

Then follow this great Mac-specific guide on installing node and npm at http://www.johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/. You've already installed node so just start on step 2.

The key portion is making sure your version of node is suitable downgraded.