-
Notifications
You must be signed in to change notification settings - Fork 9
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 './src/cipherSuite.js' #302
Comments
Thanks for the report. I'll check tomorrow. |
If I figure it out before then, I will update the PR and mark it "not draft", with some comments. |
Please don't let my comments here keep you awake. Interestingly switching from:
causes a different error: of the same form:
Seems to be the first "none type" export here: https://github.com/dajiaji/hpke-js/blob/main/core/mod.ts#L16 Seems like webpack needs to be instructed to use node modules resolve relative paths in dependencies properly Possibly relevant: webpack/webpack#472 This worked:
|
Don't worry. I fell asleep before I saw your comment above :-) |
For those trying to use this library in next 14 or greater: You can update webpack used by next, like this: https://nextjs.org/docs/app/api-reference/next-config-js/webpack const path = require("path");
module.exports = {
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
// Important: return the modified config
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
"hpke-js": path.resolve("./node_modules/hpke-js"),
},
fallback: {
...config.resolve.fallback,
"crypto": false,
},
},
}
},
} |
This error occurs when bundling with web pack, a typescript application, that included hpke-js.
I created a PoC here: #301
The text was updated successfully, but these errors were encountered: