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

NPM 3.x Error: Cannot find module 'C:\path\to\sails-permissions\generator' #222

Open
snlacks opened this issue Mar 3, 2016 · 2 comments

Comments

@snlacks
Copy link

snlacks commented Mar 3, 2016

My fix was to change .sailsrc to:

{
  "generators": {
    "modules": {
      "permissions-api": "node_modules/sails-permissions/generator"
    }
  }
}
@Download
Copy link

Download commented Aug 9, 2016

I had the same issue:

c:\ws\sails-project>sails generate permissions-api
error: Error in "permissions-api" generator (loaded from sails-permissions/generator)
C:\Users\...\AppData\Roaming\npm\node_modules\sails\node_modules\sails-generate\lib\index.js:51
      throw e;
      ^

Error: Cannot find module 'c:\ws\sails-project\sails-permissions\generator'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at module.exports (C:\Users\...\AppData\Roaming\npm\node_modules\sails\node_modules\sails-generate\lib\index.js:71:19)
    at Command.module.exports (C:\Users\...\AppData\Roaming\npm\node_modules\sails\bin\sails-generate.js:107:10)
    at Command.listener (C:\Users\...\AppData\Roaming\npm\node_modules\sails\node_modules\commander\index.js:301:8)
    at emitTwo (events.js:87:13)
    at Command.emit (events.js:172:7)
    at Command.parseArgs (C:\Users\...\AppData\Roaming\npm\node_modules\sails\node_modules\commander\index.js:615:12)

After performing your suggested fix:

c:\ws\sails-project>sails generate permissions-api
info: Created a new permissions-api ("permissions-api")!

So thank you!

@KingOfBeasts
Copy link

I had the same issue,so thank you!

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

3 participants