Closed Magesh3590 closed 1 week ago
I'm also facing this issue after the recent update from 1.0.0.next.24 to 1.0.0.next.27. This is one change I can find const qs = require('node:querystring'); -> in 1.0.0.next.27 const qs = require('querystring'); -> in 1.0.0.next.24
Same here :(
Same here, i temporary fixed the issue by adding "@polka/url": "1.0.0-next.25"
to my package.json
Same here, or switch the node version to 16
+1
temporarily solved it by adding the following lines to the package.json:
"resolutions": { "@polka/url": "1.0.0-next.24" },
!! I use yarn. if you use npm, change resolutions to overrides
What version of node are you guys running?
What version of node are you guys running?
node v14.16.0
@lukeed
Please unpublish version of v1.0.0-next.27 first, thanks.
This is a breaking change and should not use a patch version number.
I take it you’re all using Node < 16, but are you using import or require syntax?
I take it you’re all using Node < 16, but are you using import or require syntax?
require
UnhandledPromiseRejectionWarning: Error: Cannot find module 'node:querystring'
Require stack:
- /app/node_modules/@polka/url/build.js
- /app/node_modules/sirv/build.js
- /app/node_modules/webpack-bundle-analyzer/lib/viewer.js
- /app/node_modules/webpack-bundle-analyzer/lib/index.js
- /app/node_modules/**********/lib/configs/webpack.base.config.js
- /app/node_modules/**********/lib/configs/webpack.prod.config.js
- /app/node_modules/**********/lib/adapter.js
- /app/node_modules/**********/lib/index.js
@lukeed The use of @polka/url package is an indirect dependency.
➜ app npm list @polka/url
app@1.0.0 /opt/app
└─┬ webpack-bundle-analyzer@4.10.2
└─┬ sirv@2.0.4
└── @polka/url@1.0.0-next.27
The question is: why does sirv depend on the next version of @polka/url, but the stable version?
And it seems that the sirv package is also maintained by you.
Should the sirv package adjust its dependence on @polka/url
to be a stable version?
I just published a 1.0.0-next.28
for all packages, which strips the node:
prefix for all CommonJS packages. You will get these files via a require
statement.
The ESM version of each package still has the node:
prefix. You will only get this version if you are using import
syntax.
The node:
prefix was added in 16.x and back-ported to 14.18 (docs), so ensure you're on at least one of those versions. While native ESM was technically added in 12.x, it's been end-of-life (including security) for ~3 years and its version of "ESM" is significantly broken/different than today's ESM... 12.x was the first (experimental) ESM release.
Verified, thank you for the quick response :)
quick response :)
Error: Cannot find module 'node:querystring'