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 failing to find a package #124

scripting opened this issue Aug 20, 2019 · 2 comments


Copy link

commented Aug 20, 2019

I have a package called davemail.

It's really simple, it just contains a function that sends an email message through Amazon SES.

I have a project that just includes davemail. You can download the folder here.

  1. Open the folder in your Terminal app.
  2. npm install
  3. node test.js

I get this message.

Error: Cannot find module 'davemail'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/root/Dropbox/Rockaway3/scriptingnightlyemail/scriptingnightlyemail.js:5:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Does it happen for you too?

I get it only on this package. I have quite a few others that work without problem.

On my machine the folder is there in npm_modules.


This comment has been minimized.

Copy link

commented Aug 20, 2019

I can reproduce this exactly on my machine.

This is just a wild guess, but did you specify a main script in your package.json file inside the davemail module? (


This comment has been minimized.

Copy link
Owner Author

commented Aug 20, 2019

Ted, thanks for the tip -- that was it. I made the change, added a main script and it worked. ;-)

@scripting scripting closed this Aug 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.