Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Improve "Error: You have defined functions but no node_modules has been found. Please run npm install" #824

Closed
marktani opened this issue Oct 15, 2017 · 7 comments
Milestone

Comments

@marktani
Copy link
Contributor

If you have a package.json, but you did not specify the right dependencies, you will run npm install, but graphcool deploy will show the same error again.

I suggest this error message:

Error: You have defined functions but no node_modules has been found.
Please make sure you specified all needed dependencies in package.json and run npm install.

@marktani marktani added this to the 0.8 milestone Oct 15, 2017
@kbrandwijk
Copy link
Contributor

When would this error occur. If I have a package.json, but I don't use any modules in my functions, would I still get the error?

@marktani
Copy link
Contributor Author

No, currently this error only occurs if you are requiring modules, but no node_modules was found.

@kbrandwijk
Copy link
Contributor

Is there a check in place for requiring built-in modules, like 'fs' or 'util'?

@marktani
Copy link
Contributor Author

I haven't tried it, not sure.

@marktani
Copy link
Contributor Author

If that's the case, we should definitely adjust this... 🙂

@kbrandwijk
Copy link
Contributor

Just tested it and it fails. Will create a new issue.

@kbrandwijk
Copy link
Contributor

Also see #831

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants