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

Cannot find module weak #13

Open
plotti opened this issue Oct 8, 2014 · 15 comments
Open

Cannot find module weak #13

plotti opened this issue Oct 8, 2014 · 15 comments

Comments

@plotti
Copy link

plotti commented Oct 8, 2014

➜ ~ makemeasandwich
Logging in.

module.js:340
throw err;
^
Error: Cannot find module 'weak'
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 new D (/usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/index.js:28:20)
at module.exports (/usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/index.js:8:12)
at /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/phantom.js:138:13
at Server.handler (/usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/shoe/index.js:22:9)
at Server.EventEmitter.emit (events.js:95:17)
at App.emit (/usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/shoe/node_modules/sockjs/lib/sockjs.js:182:27)
➜ ~

@nmynarcik
Copy link

I'm having the same issue.

@travist
Copy link
Owner

travist commented Oct 8, 2014

What version of node.js are you using?

@nmynarcik
Copy link

for me: v0.10.29

but I am also getting this when I try to install:

> [email protected] install /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
> node-gyp rebuild
make: *** No rule to make target `../../../../../../../../../../../../../../Users/nathan', needed by `Makefile'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok

@travist
Copy link
Owner

travist commented Oct 8, 2014

This seems like it is being included from within the phantom package. I am curious if this is an issue on their end.

@jvtrigueros
Copy link

I'm also encountering this issue on Windows 8 using node version v0.10.26.

@travist
Copy link
Owner

travist commented Oct 9, 2014

Maybe a windows problem? Has anyone experienced this issue outside of a windows environment?

@travist
Copy link
Owner

travist commented Oct 9, 2014

@travist
Copy link
Owner

travist commented Oct 9, 2014

Ah... maybe there is something I can do to the library that does this... https://github.com/sgentle/phantomjs-node#use-it-in-windows

@nmynarcik
Copy link

Well, my experience was in OSX 10.9.5

@travist
Copy link
Owner

travist commented Oct 12, 2014

I have seen this before when my Python was outdated and the node-gyp was unable to compile. In my case, I fixed it by upgrading Python using Homebrew.

brew install python

Let me know if that helps.

@nmynarcik
Copy link

updating python didn't seem to help. Tried reinstalling makemeasandwich after and this is what I get.

> [email protected] install /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
> node-gyp rebuild
make: *** No rule to make target `../../../../../../../../../../../../../../Users/nathan', needed by `Makefile'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantom/node_modules/dnode/node_modules/weak
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
> [email protected] install /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantomjs
> node install.js
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-macosx.zip
Saving to /usr/local/lib/node_modules/makemeasandwich/node_modules/jquerygo/node_modules/phantomjs/phantomjs/phantomjs-1.9.7-macosx.zip
Receiving...
[===================================-----] 87% 0.0s
Received 9186K total.
Extracting zip contents
phantom
Writing location.js file
phantomjs
npm WARN optional dep failed, continuing [email protected]
/usr/local/bin/makemeasandwich -> /usr/local/lib/node_modules/makemeasandwich/bin/makemeasandwich
[email protected] /usr/local/lib/node_modules/makemeasandwich
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])

@travist
Copy link
Owner

travist commented Oct 14, 2014

This actually looks like you do not have the OSX Mac build tools installed which is required to install phantomjs. You can get them with XCode by downloading it from the AppStore. Although, I was able to install them on my machine by typing xcode-select --install in my terminal.

@nmynarcik
Copy link

that's odd because I installed them a couple weeks ago...I'll take a
look

@olivierlesnicki
Copy link

Same issue.

@badrul
Copy link

badrul commented Feb 2, 2016

To fix this, I disable 'weak' by setting it to false.

In jquery.go.js, line #73:

Change:

}, { binary: phantomjs.path });

to:

}, { 
    binary: phantomjs.path,
    dnodeOpts: {weak: false}
});

Ref: phantomjs-node/blob/master/README.markdown#use-it-in-windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants