DeprecationWarning: No "main" or "exports" field defined
See original GitHub issuenext-mdx-remote 4.0.0-rc.1 node v16.10.0
[DEP0151] DeprecationWarning: No "main" or "exports" field defined in the package.json for ***\node_modules\next-mdx-remote\ resolving the main entry point "index.js", imported from ***.js.
Default "index" lookups for the main are deprecated for ES modules.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Missing main or exports field · Issue #52 - GitHub
Node 16.9.1 DeprecationWarning: No "main" or "exports" field defined in the package.json for ".../imagemin-svgo" resolving the main entry ...
Read more >Ask Question - Stack Overflow
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at "...\node_modules\postcss\ ...
Read more >[DEP0151] DeprecationWarning under Node.js 16 #365
[DEP0151] DeprecationWarning: No "main" or "exports" field defined in the package.json for /Users/chenxi/Desktop/imufu/xingmeiji-solver/node_modules/ky/ ...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
The "main" field is supported in all versions of Node.js, but its capabilities are limited: it only defines the main entry point of...
Read more >Main property in package.json defines package entry point
exports object is returned as the return value of a require() -call. First, Node looks for a package.json file and checks if it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can ignore the deprecation warning for now. Put up a PR that should get rid of it https://github.com/hashicorp/next-mdx-remote/pull/223
Hmm, building the following (compacted) example from the readme on Node 16.13.2 LTS (Windows (x64)) also shows the deprecation warning. Is there any other way to import this package that I’m missing?
pages/index.js
package.json