-
Notifications
You must be signed in to change notification settings - Fork 23
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 error #45
Comments
Could you provide a reproducer ? |
@cescoffier Sorry, didn't get it.. I've provided both js script and package.json files to reproduce it. What else have I to do? |
If you can come up with a githup project with these files and a readme file with the instructions like:
That would save us some time. |
@cescoffier Not OP but I'm having this issue too. Here's a reproducer: https://github.com/ejmurra/error_reproducer_vertx.git It seems that top level require statements such as require('request') error out when the requested module makes another request for a peer dependency (in this case |
Thanks ! Gonna have a look. |
vert.x javascript is not based on node, even though we can load node modules once a module requires a native node such as vert.x uses nashorn to run scripts as long as your node modules are pure javascript without using any node API they should work. For example you can run template engines like handlebars, react or any module you could run on a browser. |
@pmlopes That makes sense to me. What confuses me is that the error is thrown here which points to this file which has no dependencies (native node modules or otherwise). This leads me to think that nashorn is tracing the |
You have a corrupted npm install After that I run your example: npm start And got the error:
And this leads back to what I've written before, |
Hi! I have js verticle and package.json contains:
npm-test.js file contains:
After
npm install
I'm trying to runvertx run npm-test.js
but this puts "Cannot find module fs" error in my console.Of course my $NODE_PATH points to the right node's installation dir.
What should I do to resolve this issue?
The text was updated successfully, but these errors were encountered: