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 #3

Closed
emilabraham opened this issue Aug 30, 2015 · 9 comments
Closed

Cannot find module #3

emilabraham opened this issue Aug 30, 2015 · 9 comments

Comments

@emilabraham
Copy link
Contributor

It seems to have installed correctly in my project. I see it my node_modules folder. I also see it in my package.json. But when I require the module and attempt to run it, I get a Module not found error. My project can be found on my github: https://github.com/emilabraham/apchange

module.js:340
    throw err;
          ^
Error: Cannot find module 'riot-games-api-nodejs'
    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 Object.<anonymous> (/home/honestemu/Documents/apchange/apicalls.js:4:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3
@tskaufma
Copy link

I've found in the latest build the package.json says the main is "app.js" when there is no such file. I copied lib\riot-games-api-nodejs.js to app.js and it seems to work.

Hope that helps.

@emilabraham
Copy link
Contributor Author

That did it for me. I'm gonna make a pull request. However, I also found that pointing the main to "./lib/riot-games-api-nodejs.js" also works. Which do you think would better follow the standards, @tskaufma? Your change or the change I tried?

@tskaufma
Copy link

tskaufma commented Sep 2, 2015

I think your change would be better as a PR since it doesn't duplicate the code file. I don't know about best practices.

@emilabraham
Copy link
Contributor Author

Pull request merged. That should solve the issue.

@byWulf
Copy link

byWulf commented Feb 29, 2016

@emilabraham Hey :) When will this change be in a stable release for install via npm?

@emilabraham
Copy link
Contributor Author

Paging @HardTacos as he is the publisher of the official npm module.

@Dowdow
Copy link

Dowdow commented Nov 18, 2016

Hello ! This change is not on the stable release. Is this repository still maintained ?

@amcd1443
Copy link

amcd1443 commented Jul 2, 2017

bump still not merged into stable

@HardTacos
Copy link
Owner

changes have been published to npm.

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