-
Notifications
You must be signed in to change notification settings - Fork 21
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
Invalid package.json "type" field on npm install #1219
Comments
Hi @imathews, thanks for the report. Each package has its own At first, we used to publish with I'll investigate again if the original issue can be resolved another way. |
Thanks for the update @axelboc - all makes sense. I'm not particularly familiar with pnpm, though I wonder if there's a way to just remove the |
I've gone with removing the Can you please try version |
Just tried this out — this release seems to do the trick (no more warnings on build, and otherwise h5web continues to work great). Thanks @axelboc! |
Great to hear! 🎉 |
Describe the bug
When installing
@h5web/app
and@h5web/wasm
(@6.3.0
), the package.json file for the installed packages innode_modules
contains an invalid"type": ""
field. Thetype
inpackage.json
should be one ofcommonjs
,module
. This is specifically happening for @h5web/lib, @h5web/app, @h5web/h5wasm.I can see that the package.json in this repo doesn't have any
"type"
field, so I imagine it must be getting added during a build step.The incorrect field creates distracting warnings on certain build tools, such as esbuild (see below). I imagine this might effect tree shaking and other module resolution behavior for these tools as well (though FWIW, h5web is working smoothly despite these warnings).
To Reproduce
npm install @h5web/app
Expected behaviour
The "type" field in package.json I believe should be set to
"module"
for this libraryContext
The text was updated successfully, but these errors were encountered: