Can't switch to Turbo due to a Browserslist error #8691
-
SummaryI've been doing some code maintenance and updating packages for a project. All good expect I cannot use Turbp in development and cannot understand why and how I should fix it. When I run the project with Anyone can help me? Additional information➜ nextjs git:(development) ✗ npm run dev
> dev
> NODE_TLS_REJECT_UNAUTHORIZED=0 next dev --turbo
▲ Next.js 14.2.4 (turbo)
- Local: http://localhost:3000
- Environments: .env.local, .env
- Experiments (use with caution):
· largePageDataBytes
· instrumentationHook
✓ Starting...
✓ Ready in 3.5s
⚠ Webpack is configured while Turbopack is not, which may cause problems.
⚠ See instructions if you need to configure Turbopack:
https://nextjs.org/docs/app/api-reference/next-config-js/turbo
○ Compiling / ...
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
✓ Compiled / in 5.3s
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
○ Compiling /_error ...
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
✓ Compiled /_error in 1211ms
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:206:17
Module not found
204 | checkExtend(name)
205 | }
> 206 | var stats = require(require.resolve(
| ^^^^^^^^^^^^^^^^^^^^^^^^
> 207 | path.join(name, 'browserslist-stats.json'),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 208 | { paths: ['.'] }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 209 | ))
| ^^^^^^^
210 | return normalizeStats(data, stats)
211 | },
212 |
https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/browserslist/node.js:185:19
Module not found
183 | checkExtend(name)
184 | }
> 185 | var queries = require(require.resolve(name, { paths: ['.', ctx.path] }))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
186 | if (queries) {
187 | if (Array.isArray(queries)) {
188 | return queries
https://nextjs.org/docs/messages/module-not-found
GET / 500 in 7208msExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
Could you open an issue on Next.js for this? 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
@GregoryWullimann any luck in finding a solution ? I'm experiencing the same issue but it's an env issue as my other projects run well on turbopack, but just one of them can't and I get this error |
Beta Was this translation helpful? Give feedback.
-
|
Resolved this issue by running: |
Beta Was this translation helpful? Give feedback.
Could you open an issue on Next.js for this? 🙏
https://github.com/vercel/next.js/issues/new?assignees=&labels=bug&projects=&template=1.bug_report.yml