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
Error [ERR_REQUIRE_ESM]: require() of ES Module [...]/node_modules/.pnpm/[email protected]/node_modules/chalk/source/index.js from [...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/async.js not supported.
#2023
Ever since the 2.28.1 update, I get this error. Note that I have "type": "module", in my package.json.
The error message:
Error [ERR_REQUIRE_ESM]: require() of ES Module [...]/node_modules/.pnpm/[email protected]/node_modules/chalk/source/index.js from [...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/async.js not supported.
Instead change the require of index.js in [...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/async.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/async.js:7:13)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/async-tasks.js:1:13)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/browser-sync.js:3:18)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/index.js:7:19) {
code: 'ERR_REQUIRE_ESM'
}
Steps to reproduce/test case
I did not try to create an isolated reproduction, but I expect having "type": "module", in a package.json should do the trick.
Please specify which version of Browsersync, node and npm you're running
Browsersync [2.28.1]
Node [18]
Npm [pnpm v7.28.0]
Affected platforms
Note that I only tested this on Ubuntu.
linux
windows
OS X
freebsd
solaris
other (please specify which)
Browsersync use-case
API
Gulp
Grunt
CLI
If CLI, please paste the entire command below
n/a
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
Error [ERR_REQUIRE_ESM]: require() of ES Module [...]/node_modules/.pnpm/[email protected]/node_modules/chalk/source/index.js from [...]/node_modules/.pnpm/[email protected]/node_modules/eazy-logger/index.js not supported.
Instead change the require of [...]/node_modules/.pnpm/[email protected]/node_modules/chalk/source/index.js in [...]/node_modules/.pnpm/[email protected]/node_modules/eazy-logger/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/eazy-logger/index.js:4:13)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/logger.js:7:14)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/browser-sync.js:7:14)
at Object.<anonymous> ([...]/node_modules/.pnpm/[email protected]/node_modules/browser-sync/dist/index.js:7:19) {
code: 'ERR_REQUIRE_ESM'
}
Issue details
Ever since the 2.28.1 update, I get this error. Note that I have
"type": "module",
in mypackage.json
.The error message:
Steps to reproduce/test case
I did not try to create an isolated reproduction, but I expect having
"type": "module",
in apackage.json
should do the trick.Please specify which version of Browsersync, node and npm you're running
Affected platforms
Note that I only tested this on Ubuntu.
Browsersync use-case
If CLI, please paste the entire command below
n/a
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
The text was updated successfully, but these errors were encountered: