Closed 3cp closed 4 years ago
This package got new field in package.json
"exports": { ".": [ { "default": "./index.js" }, "./index.js" ], "./package": "./package.json", "./package.json": "./package" },
However, it doesn't work.
To reproduce the error, go to an empty folder.
npm i deep-equal node > require('deep-equal/package.json') Uncaught Error: Cannot find module 'deep-equal/package.json' Require stack: - <repl> at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15) at Function.resolve (internal/modules/cjs/helpers.js:78:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '<repl>' ] }
The fix: Change
"./package.json": "./package"
To
"./package.json": "./package.json"
You're totally right, thanks. I'll fix that.
This package got new field in package.json
However, it doesn't work.
To reproduce the error, go to an empty folder.
The fix: Change
To