-
Notifications
You must be signed in to change notification settings - Fork 293
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 http
#273
Comments
Could you please provide some more repro instructions? (gave you some pointers on this on Slack) |
Yup. I'll create repo soon. {
"private": true,
"name": "slack-nda",
"version": "0.1.0",
"main": "index.js",
"license": "Apache-2.0",
"devDependencies": {
"eslint": "^5.13.0",
"eslint-config-tunnckocore": "^3.0.0",
"prettier": "^1.16.4"
},
"dependencies": {
"axios": "^0.18.0",
"dateformat": "^3.0.3",
"docx-templates": "^2.9.1",
"fs-extra": "^7.0.1",
"micro": "^9.3.3",
"slack": "^11.0.1"
}
}
|
Repo for reproduce: https://github.com/tunnckoCore/slack-nda Latest deployment: https://slack-zeit-nda-4dcvv9nkp.now.sh/ Once we hit it, it gives us that error. |
I'm seeing the same thing with 0.14.0 and |
Ok, I did a bit more digging, and in my case it was due to a module generating the require string dynamically like
I don't know if this is something ncc is able to handle? |
Whatever it is, it does not make sense to error, since both modules exist in nodejs :D Pretty strange error. Debugging isn't quite easy because everything is bundled and not in your machine so you can't follow the stacktrace. But anyway, I couldn't find what was wrong, but continued with refactoring and it disappeared. |
@porsager would you mind submitting a PR with that minimal test case? |
I've added a fix here in vercel/webpack-asset-relocator-loader@590d2ab. Will post the update PR shortly. |
@rauchg sorry, seems @guybedford beat me to it :) Nice job! And thank you for an awesome tool. This really cleans up our distributed apps! |
Fixed in ncc@0.15.1 |
Is the fix released? I'm still getting this error. |
@EnixCoda It was released in |
@styfle Thanks for replying! BTW, how can I subscribe to release updates? |
@EnixCoda, github recently added such feature, click the watch button and then "releases only". |
@tunnckoCore I see, thank you! |
@EnixCoda Can you create a new issue and provide the source code to reproduce this bug? Thanks! |
Pretty strange.
With
now.json
I was using
node-fetch
, then switched toaxios
and still fails. Which make sense, since it's built-in module :D But.. I can't understand where this error can come from. Stack traces doesn't help too?The text was updated successfully, but these errors were encountered: