You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't figure out how to show this in Codesandbox, but you can make this issue happen by running node locally with a newer version of Node (I can't run v15, but I believe it happens there, in addition to v16, where I experienced the issue). Make sure systemjs is installed locally, run node to get into the interactive prompt, and type:
require('systemjs/dist/s.js')// import() and require.resolve() also trigger the warning
You will see this message printed to the console:
(node:91715) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./dist/" in the "exports" field module resolution of the package at <PROJECT>/node_modules/systemjs/package.json imported from <PROJECT>/repl.
Update this package.json to use a subpath pattern like "./dist/*".
(Use `node --trace-deprecation ...` to show where the warning was created)
Expected Behavior
There are no warnings when attempting to resolve SystemJS in Node.
Actual Behavior
There are for some versions of node :) From perusing other projects with similar issues, it seems that the "fix" is to update this export entry: https://github.com/systemjs/systemjs/blob/main/package.json#L12 to instead use a * to represent that you can reach into any files on that subpath:
{
"./dist/*": "./dist/*"
}
Though, based on issues like postcss/postcss#1455, it appears that this might not allow these specifiers to work with some versions of Node 12. It's not the end of the world for me to experience this error, but would love not to have it if possible.
Thanks for all the amazing work on SystemJS!
The text was updated successfully, but these errors were encountered:
Demonstration
I couldn't figure out how to show this in Codesandbox, but you can make this issue happen by running
node
locally with a newer version of Node (I can't run v15, but I believe it happens there, in addition to v16, where I experienced the issue). Make suresystemjs
is installed locally, runnode
to get into the interactive prompt, and type:You will see this message printed to the console:
Expected Behavior
There are no warnings when attempting to resolve SystemJS in Node.
Actual Behavior
There are for some versions of node :) From perusing other projects with similar issues, it seems that the "fix" is to update this export entry: https://github.com/systemjs/systemjs/blob/main/package.json#L12 to instead use a
*
to represent that you can reach into any files on that subpath:Though, based on issues like postcss/postcss#1455, it appears that this might not allow these specifiers to work with some versions of Node 12. It's not the end of the world for me to experience this error, but would love not to have it if possible.
Thanks for all the amazing work on SystemJS!
The text was updated successfully, but these errors were encountered: