Skip to content

Cannot find module 'shelljs' after installing shelljs with npm #109

@raphaelcruzeiro

Description

@raphaelcruzeiro

I have installed shelljs with npm with no problems:

npm install shelljs -g

But when I try to import shelljs into my project I get the error:

var shell = require('shelljs');

Error: Cannot find module 'shelljs'
    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 repl:1:2
    at REPLServer.self.eval (repl.js:110:21)
    at Interface.<anonymous> (repl.js:239:12)
    at Interface.EventEmitter.emit (events.js:95:17)
    at Interface._onLine (readline.js:202:10)
    at Interface._line (readline.js:531:8)

I have trying installing shelljs both globally and locally. I am using OS X Mavericks 10.9.2. Npm lists shelljs as installed:

shelljs@0.2.6 /usr/local/lib/node_modules/shelljs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions