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

Error: Cannot find module '../' #49

Closed
Ricket opened this issue Jun 8, 2017 · 3 comments · Fixed by #86
Closed

Error: Cannot find module '../' #49

Ricket opened this issue Jun 8, 2017 · 3 comments · Fixed by #86

Comments

@Ricket
Copy link

Ricket commented Jun 8, 2017

I am on macOS Sierra, running node 7.6.0 (installed via nvm). I find that when I run which (this node module), I get the following error:

module.js:472
    throw err;
    ^

Error: Cannot find module '../'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/carter/Dev/node_modules/.bin/which:2:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

If I update line 2 of node_modules/.bin/which to instead be var which = require("../which") then the script succeeds.

@kartolo
Copy link

kartolo commented Aug 26, 2019

+1 to this. I'm on Mojave with node v12.1.0

@isaacs
Copy link
Contributor

isaacs commented Aug 28, 2019

What does this command print?

ls -laF node_modules/.bin/which

It should be a symbolic link. If it isn't, then something is fishy. How did you install it?

@kartolo
Copy link

kartolo commented Aug 28, 2019

Hi @isaacs,

I was installing https://github.com/bchatard/alfred-jetbrains (Workflow for the Alfred App on Mac OSX). In the workflow installation is node_modules/.bin/which not a symlink.

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

Successfully merging a pull request may close this issue.

3 participants