-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WEB-964] [Turbopack] Error resolving commonjs request #2372
Comments
Came here looking to see if anyone else had the same issue. Also get these using
|
I tried to enable turbo and encountered similar issues with the details
|
Similar issue using $ npx create-next-app@latest turbo-test
$ cd turbo-test
$ echo "const EventEmitter = require('events');\nexport class Foo extends EventEmitter {}" >> pages/index.js
$ next dev --turbo
...
error - [rendering] [root of the dev server]/
Error during SSR Rendering
TypeError: Class extends value #<Object> is not a constructor or null
at <unknown> (.next/server/pages/chunks/pages_index.js:73:25)
... The error goes away when I change to the named export The default cjs export for EventEmitter is here https://github.com/nodejs/node/blob/v16.18.0/lib/events.js#L215 |
I think there are a few issues being reported here.
I think we can get stdlib imports to work in SSR, and should stop that error from reporting. If you use it in client side, then we need to still warn. For the dynamic requires (it's using eval!), this is challenging to support. Again, we could just let node handle it, but that'll break if you're trying to do a relative require (this case requires a |
Had the same issue, removing my |
Any news on this? Removing |
with latest 13.4.0, still have error: error - [resolve] node_modules/.pnpm/opener@1.5.2/node_modules/opener/lib/opener.js
node_modules/.pnpm/opener@1.5.2/node_modules/opener/lib/opener.js:65:12 Error resolving commonjs request
61 | });
62 | args = ["/c", "start", "\"\""].concat(args);
63 | }
64 |
+ v-----------------------------------------------------v
65 + return childProcess.execFile(command, args, options, callback);
+ ^-----------------------------------------------------^
66 | };
67 |
unable to resolve dynamic or dynamic or dynamic
warning -
[parse]
node_modules/.pnpm/gzip-size@6.0.0/node_modules/gzip-size/index.js
node_modules/.pnpm/gzip-size@6.0.0/node_modules/gzip-size/index.js:49:17 lint TP1004 fs.createReadStream(???*0*) is very dynamic
45 | };
46 |
47 | module.exports.file = (path, options) => {
48 | return new Promise((resolve, reject) => {
+ v
49 + const stream = fs.createReadStream(path);
+ ^
50 | stream.on('error', reject);
51 |
52 | const gzipStream = stream.pipe(module.exports.stream(options));
53 | gzipStream.on('error', reject);
- *0* path
⚠️ pattern without value
node_modules/.pnpm/gzip-size@6.0.0/node_modules/gzip-size/index.js:58:65 lint TP1004 fs.readFileSync(???*0*) is very dynamic
54 | gzipStream.on('gzip-size', resolve);
55 | });
56 | };
57 |
+ v
58 + module.exports.fileSync = (path, options) => module.exports.sync(fs.readFileSync(path), options);
+ ^
59 |
- *0* path
⚠️ pattern without value
node_modules/.pnpm/opener@1.5.2/node_modules/opener/lib/opener.js
node_modules/.pnpm/opener@1.5.2/node_modules/opener/lib/opener.js:65:11 lint TP1005 child_process.execFile(
61 | });
62 | args = ["/c", "start", "\"\""].concat(args);
63 | }
64 |
+ v
65 + return childProcess.execFile(command, args, options, callback);
+ ^
66 | };
67 |
(???*0* | "cmd.exe" | "open" | "xdg-open" | ???*1* | FreeVar(undefined) | ???*3*),
(???*4* | [???*5*] | ???*6* | ???*9*),
(???*11* | {}),
(???*12* | {})
) is very dynamic
- *0* command
⚠️ pattern without value
- *1* ???*2*["command"]
⚠️ unknown object
- *2* arguments[1]
⚠️ function calls are not analysed yet
- *3* unknown mutation
- *4* arguments[0]
⚠️ function calls are not analysed yet
- *5* args
⚠️ circular variable reference
- *6* ???*7*(???*8*)
⚠️ unknown callee
- *7* [(??? | FreeVar(undefined) | ???)]["concat"]
⚠️ non-num constant property on array
- *8* args
⚠️ circular variable reference
- *9* ???*10*["map"](*anonymous function 2149*)
⚠️ unknown callee object
- *10* args
⚠️ circular variable reference
- *11* arguments[1]
⚠️ function calls are not analysed yet
- *12* arguments[2]
⚠️ function calls are not analysed yet
node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.js
node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.js:43:29 lint TP1004 fs.existsSync((???*0* | ???*1*)) is very dynamic
39 | let i=0, arr=toAssume(uri, extns);
40 | let abs, stats, name, headers;
41 | for (; i < arr.length; i++) {
42 | abs = normalize(join(dir, name=arr[i]));
+ v
43 + if (abs.startsWith(dir) && fs.existsSync(abs)) {
+ ^
44 | stats = fs.statSync(abs);
45 | if (stats.isDirectory()) continue;
46 | headers = toHeaders(name, stats, isEtag);
47 | headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
- *0* abs
⚠️ pattern without value
- *1* ???*2*(join(dir, ???*4*))
⚠️ unknown callee
- *2* path*3*["normalize"]
⚠️ unsupported property on Node.js path module
- *3* path: The Node.js path module: https://nodejs.org/api/path.html
- *4* unsupported expression
node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.js:44:11 lint TP1004 fs.statSync((???*0* | ???*1*)) is very dynamic
40 | let abs, stats, name, headers;
41 | for (; i < arr.length; i++) {
42 | abs = normalize(join(dir, name=arr[i]));
43 | if (abs.startsWith(dir) && fs.existsSync(abs)) {
+ v
44 + stats = fs.statSync(abs);
+ ^
45 | if (stats.isDirectory()) continue;
46 | headers = toHeaders(name, stats, isEtag);
47 | headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
48 | return { abs, stats, headers };
- *0* abs
⚠️ pattern without value
- *1* ???*2*(join(dir, ???*4*))
⚠️ unknown callee
- *2* path*3*["normalize"]
⚠️ unsupported property on Node.js path module
- *3* path: The Node.js path module: https://nodejs.org/api/path.html
- *4* unsupported expression
node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.js:88:1 lint TP1004 fs.createReadStream(???*0*, {}) is very dynamic
84 | headers['Accept-Ranges'] = 'bytes';
85 | }
86 |
87 | res.writeHead(code, headers);
+ v
88 + fs.createReadStream(file, opts).pipe(res);
+ ^
89 | }
90 |
91 | const ENCODING = {
92 | '.br': 'br',
- *0* arguments[2]
⚠️ function calls are not analysed yet
node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.js
node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.js:43:29 lint TP1004 fs.existsSync((???*0* | ???*1*)) is very dynamic
39 | let i=0, arr=toAssume(uri, extns);
40 | let abs, stats, name, headers;
41 | for (; i < arr.length; i++) {
42 | abs = normalize(join(dir, name=arr[i]));
+ v
43 + if (abs.startsWith(dir) && fs.existsSync(abs)) {
+ ^
44 | stats = fs.statSync(abs);
45 | if (stats.isDirectory()) continue;
46 | headers = toHeaders(name, stats, isEtag);
47 | headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
- *0* abs
⚠️ pattern without value
- *1* ???*2*(join(dir, ???*4*))
⚠️ unknown callee
- *2* path*3*["normalize"]
⚠️ unsupported property on Node.js path module
- *3* path: The Node.js path module: https://nodejs.org/api/path.html
- *4* unsupported expression
node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.js:44:11 lint TP1004 fs.statSync((???*0* | ???*1*)) is very dynamic
40 | let abs, stats, name, headers;
41 | for (; i < arr.length; i++) {
42 | abs = normalize(join(dir, name=arr[i]));
43 | if (abs.startsWith(dir) && fs.existsSync(abs)) {
+ v
44 + stats = fs.statSync(abs);
+ ^
45 | if (stats.isDirectory()) continue;
46 | headers = toHeaders(name, stats, isEtag);
47 | headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
48 | return { abs, stats, headers };
- *0* abs
⚠️ pattern without value
- *1* ???*2*(join(dir, ???*4*))
⚠️ unknown callee
- *2* path*3*["normalize"]
⚠️ unsupported property on Node.js path module
- *3* path: The Node.js path module: https://nodejs.org/api/path.html
- *4* unsupported expression
node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.js:88:1 lint TP1004 fs.createReadStream(???*0*, {}) is very dynamic
84 | headers['Accept-Ranges'] = 'bytes';
85 | }
86 |
87 | res.writeHead(code, headers);
+ v
88 + fs.createReadStream(file, opts).pipe(res);
+ ^
89 | }
90 |
91 | const ENCODING = {
92 | '.br': 'br',
- *0* arguments[2]
⚠️ function calls are not analysed yet
node_modules/.pnpm/webpack-bundle-analyzer@4.7.0/node_modules/webpack-bundle-analyzer/lib/analyzer.js
node_modules/.pnpm/webpack-bundle-analyzer@4.7.0/node_modules/webpack-bundle-analyzer/lib/analyzer.js:179:20 lint TP1004 fs.readFileSync(???*0*, "utf8") is very dynamic
175 | });
176 | }
177 |
178 | function readStatsFromFile(filename) {
+ v
179 + return JSON.parse(fs.readFileSync(filename, 'utf8'));
+ ^
180 | }
181 |
182 | function getChildAssetBundles(bundleStats, assetName) {
183 | return (bundleStats.children || []).find(c => _(c.assetsByChunkName).values().flatten().includes(assetName));
- *0* arguments[0]
⚠️ function calls are not analysed yet
node_modules/.pnpm/webpack-bundle-analyzer@4.7.0/node_modules/webpack-bundle-analyzer/lib/parseUtils.js
node_modules/.pnpm/webpack-bundle-analyzer@4.7.0/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:16:18 lint TP1004 fs.readFileSync(???*0*, "utf8") is very dynamic
12 | parseBundle
13 | };
14 |
15 | function parseBundle(bundlePath) {
+ v
16 + const content = fs.readFileSync(bundlePath, 'utf8');
+ ^
17 | const ast = acorn.parse(content, {
18 | sourceType: 'script',
19 | // I believe in a bright future of ECMAScript!
20 | // Actually, it's set to `2050` to support the latest ECMAScript version that currently exists.
- *0* arguments[0]
⚠️ function calls are not analysed yet
[resolve]
node_modules/.pnpm/ws@7.5.9/node_modules/ws/lib/buffer-util.js
node_modules/.pnpm/ws@7.5.9/node_modules/ws/lib/buffer-util.js:105:22 Error resolving commonjs request
101 | return buf;
102 | }
103 |
104 | try {
+ v-------------------v
105 + const bufferUtil = require('bufferutil');
+ ^-------------------^
106 | const bu = bufferUtil.BufferUtil || bufferUtil;
107 |
108 | module.exports = {
109 | concat,
unable to resolve module "bufferutil"
node_modules/.pnpm/ws@7.5.9/node_modules/ws/lib/validation.js
node_modules/.pnpm/ws@7.5.9/node_modules/ws/lib/validation.js:86:21 Error resolving commonjs request
82 | return true;
83 | }
84 |
85 | try {
+ v-----------------------v
86 + let isValidUTF8 = require('utf-8-validate');
+ ^-----------------------^
87 |
88 | /* istanbul ignore if */
89 | if (typeof isValidUTF8 === 'object') {
90 | isValidUTF8 = isValidUTF8.Validation.isValidUTF8; // utf-8-validate@<3.0.0
unable to resolve module "utf-8-validate"
node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/buffer-util.js
node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/buffer-util.js:117:24 Error resolving commonjs request
113 |
114 | /* istanbul ignore else */
115 | if (!process.env.WS_NO_BUFFER_UTIL) {
116 | try {
+ v-------------------v
117 + const bufferUtil = require('bufferutil');
+ ^-------------------^
118 |
119 | module.exports.mask = function (source, mask, output, offset, length) {
120 | if (length < 48) _mask(source, mask, output, offset, length);
121 | else bufferUtil.mask(source, mask, output, offset, length);
unable to resolve module "bufferutil"
node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/validation.js
node_modules/.pnpm/ws@8.13.0/node_modules/ws/lib/validation.js:122:25 Error resolving commonjs request
118 | return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
119 | };
120 | } /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {
121 | try {
+ v-----------------------v
122 + const isValidUTF8 = require('utf-8-validate');
+ ^-----------------------^
123 |
124 | module.exports.isValidUTF8 = function (buf) {
125 | return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
126 | };
unable to resolve module "utf-8-validate"
event - 2 requests (GET /, ...) 1106ms
[404] /login (630ms)
event - 2 requests (GET /_next/static/chunks/_4cbf18._.js, ...) 631ms
event - 14 requests (GET /favicon.ico, ...) 729ms
[404] /favicon.ico (161ms)
|
There's some bad presentation for the error logs, but the core issue is:
The |
I have the same issue : Warning: Webpack is configured while Turbopack is not, which may cause problems.
See instructions if you need to configure Turbopack:
https://turbo.build/pack/docs/features/customizing-turbopack
Learn more about Next.js v13 and Turbopack: https://nextjs.link/with-turbopack
Please direct feedback to: https://nextjs.link/turbopack-feedback
ready - started server on [::]:3000, url: http://localhost:3000
error - [resolve] node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:50:50 Error resolving commonjs request
46 | }
47 |
48 | return Object.assign({}, nextConfig, {
49 | webpack(config, options) {
+ v-----------------------v
50 + config.resolve.alias['next-intl/config'] = require.resolve(i18nPath);
+ ^-----------------------^
51 |
52 | if (typeof nextConfig.webpack === 'function') {
53 | return nextConfig.webpack(config, options);
54 | }
unable to resolve dynamic or dynamic or dynamic
warning - [parse] node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:10:9 lint TP1004 fs.existsSync((???*0* | ???*1* | ???*2*)) is very dynamic
6 | function initPlugin(i18nPath, nextConfig) {
7 | if (i18nPath) {
8 | i18nPath = path.resolve(i18nPath);
9 |
+ v
10 + if (!fs.existsSync(i18nPath)) {
+ ^
11 | throw new Error(
12 | `Could not find i18n config at ${i18nPath}, please provide a valid path.`
13 | );
14 | }
- *0* arguments[0]
⚠️ function calls are not analysed yet
- *1* i18nPath
⚠️ circular variable reference
- *2* ???*3*((...) => fs["existsSync"](cur))
⚠️ unknown callee
- *3* [???, ???, ???, ???, ???, ???, ???, ???]["find"]
⚠️ non-num constant property on array
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:26:20 lint TP1006 path.resolve(???*0*) is very dynamic
22 | './src/i18n.ts',
23 | './src/i18n.js',
24 | './src/i18n.jsx'
25 | ]
+ v
26 + .map((cur) => path.resolve(cur))
+ ^
27 | .find((cur) => fs.existsSync(cur));
28 |
29 | if (!i18nPath) {
30 | throw new Error(`\n\nCould not locate i18n config. Create one at \`./(src/)i18n.{js,jsx,ts,tsx}\` or specify a custom location:
- *0* cur
⚠️ pattern without value
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:27:21 lint TP1004 fs.existsSync(???*0*) is very dynamic
23 | './src/i18n.js',
24 | './src/i18n.jsx'
25 | ]
26 | .map((cur) => path.resolve(cur))
+ v
27 + .find((cur) => fs.existsSync(cur));
+ ^
28 |
29 | if (!i18nPath) {
30 | throw new Error(`\n\nCould not locate i18n config. Create one at \`./(src/)i18n.{js,jsx,ts,tsx}\` or specify a custom location:
31 |
- *0* cur
⚠️ pattern without value
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:50:49 lint TP1003 require.resolve((???*0* | ???*1* | ???*2*)) is very dynamic
46 | }
47 |
48 | return Object.assign({}, nextConfig, {
49 | webpack(config, options) {
+ v
50 + config.resolve.alias['next-intl/config'] = require.resolve(i18nPath);
+ ^
51 |
52 | if (typeof nextConfig.webpack === 'function') {
53 | return nextConfig.webpack(config, options);
54 | }
- *0* arguments[0]
⚠️ function calls are not analysed yet
- *1* i18nPath
⚠️ circular variable reference
- *2* ???*3*((...) => fs["existsSync"](cur))
⚠️ unknown callee
- *3* [???, ???, ???, ???, ???, ???, ???, ???]["find"]
⚠️ non-num constant property on array
node_modules/.pnpm/next-intl@2.15.0-beta.3_next@13.4.4_react@18.2.0/node_modules/next-intl/plugin.js:8:15 lint TP1006 path.resolve((???*0* | ???*1* | ???*2*)) is very dynamic
4 | const path = require('path');
5 |
6 | function initPlugin(i18nPath, nextConfig) {
7 | if (i18nPath) {
+ v
8 + i18nPath = path.resolve(i18nPath);
+ ^
9 |
10 | if (!fs.existsSync(i18nPath)) {
11 | throw new Error(
12 | `Could not find i18n config at ${i18nPath}, please provide a valid path.`
- *0* arguments[0]
⚠️ function calls are not analysed yet
- *1* i18nPath
⚠️ circular variable reference
- *2* ???*3*((...) => fs["existsSync"](cur))
⚠️ unknown callee
- *3* [???, ???, ???, ???, ???, ???, ???, ???]["find"]
⚠️ non-num constant property on array
event - 2 requests (GET /, ...) 553ms |
hey any update on this issue? I'm having the same errors
|
I get similar error info: next-fineai:dev: - error Error: Cannot access .then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
next-fineai:dev: at Object.get (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js:51:15) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_bd4ac8._.js:11260:15]
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:606:29) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39084:29]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39012:76]
next-fineai:dev: at async Promise.all (index 1)
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:485:38) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:38979:38]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39012:76]
next-fineai:dev: at async Promise.all (index 0)
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:485:38) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:38979:38]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39247:58]
next-fineai:dev: - error Error: Cannot access .then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
next-fineai:dev: at Object.get (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js:51:15) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_bd4ac8._.js:11260:15]
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:606:29) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39084:29]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39012:76]
next-fineai:dev: at async Promise.all (index 1)
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:485:38) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:38979:38]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39012:76]
next-fineai:dev: at async Promise.all (index 0)
next-fineai:dev: at async createComponentTree (node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/app-render/app-render.js:485:38) [/Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:38979:38]
next-fineai:dev: [at async /Users/tangye/Workspace/next-fineai/apps/next-fineai/.next/server/app/edge-pages/chunks/ssr/08b5e__pnpm_29e1e0._.js:39247:58]
next-fineai:dev: digest: "2057607017"
next-fineai:dev: error - [resolve] node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/nanoid/index.cjs
next-fineai:dev: node_modules/.pnpm/next@13.4.9_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/nanoid/index.cjs:1:45 Error resolving commonjs request
next-fineai:dev: + v---------------v
next-fineai:dev: 1 + (()=>{var e={113:e=>{"use strict";e.exports=require("crypto")},660:(e,r,t)=>{let l=t(113);let{urlAlphabet:a}=t(591);const n=128;let _,u;let fillPool=e=>{if(!_||...ndefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(660);module.exports=t})();
next-fineai:dev: + ^---------------^
next-fineai:dev:
next-fineai:dev: unable to resolve module "crypto"
next-fineai:dev:
next-fineai:dev: warning - [parse]
next-fineai:dev: node_modules/.pnpm/postcss@8.4.24/node_modules/postcss/lib/input.js
next-fineai:dev: node_modules/.pnpm/postcss@8.4.24/node_modules/postcss/lib/input.js:44:20 lint TP1006 path.resolve(???*0*) is very dynamic
next-fineai:dev: 40 | isAbsolute(opts.from)
next-fineai:dev: 41 | ) {
next-fineai:dev: 42 | this.file = opts.from
next-fineai:dev: 43 | } else {
next-fineai:dev: + v
next-fineai:dev: 44 + this.file = resolve(opts.from)
next-fineai:dev: + ^
next-fineai:dev: 45 | }
next-fineai:dev: 46 | }
next-fineai:dev: 47 |
next-fineai:dev: 48 | if (pathAvailable && sourceMapAvailable) {
next-fineai:dev:
next-fineai:dev: - *0* ???*1*["from"]
next-fineai:dev: ⚠️ unknown object
next-fineai:dev: - *1* opts
next-fineai:dev: ⚠️ pattern without value
next-fineai:dev:
next-fineai:dev: node_modules/.pnpm/postcss@8.4.24/node_modules/postcss/lib/previous-map.js
next-fineai:dev: node_modules/.pnpm/postcss@8.4.24/node_modules/postcss/lib/previous-map.js:88:8 lint TP1004 fs.existsSync(???*0*) is very dynamic
next-fineai:dev: 84 | }
next-fineai:dev: 85 |
next-fineai:dev: 86 | loadFile(path) {
next-fineai:dev: 87 | this.root = dirname(path)
next-fineai:dev: + v
next-fineai:dev: 88 + if (existsSync(path)) {
next-fineai:dev: + ^
next-fineai:dev: 89 | this.mapFile = path
next-fineai:dev: 90 | return readFileSync(path, 'utf-8').toString().trim()
next-fineai:dev: 91 | }
next-fineai:dev: 92 | }
next-fineai:dev:
next-fineai:dev: - *0* arguments[0]
next-fineai:dev: ⚠️ function calls are not analysed yet
next-fineai:dev:
next-fineai:dev: node_modules/.pnpm/postcss@8.4.24/node_modules/postcss/lib/previous-map.js:90:13 lint TP1004 fs.readFileSync(???*0*, "utf-8") is very dynamic
next-fineai:dev: 86 | loadFile(path) {
next-fineai:dev: 87 | this.root = dirname(path)
next-fineai:dev: 88 | if (existsSync(path)) {
next-fineai:dev: 89 | this.mapFile = path
next-fineai:dev: + v
next-fineai:dev: 90 + return readFileSync(path, 'utf-8').toString().trim()
next-fineai:dev: + ^
next-fineai:dev: 91 | }
next-fineai:dev: 92 | }
next-fineai:dev: 93 |
next-fineai:dev: 94 | loadMap(file, prev) {
next-fineai:dev:
next-fineai:dev: - *0* arguments[0]
next-fineai:dev: ⚠️ function calls are not analysed yet
next-fineai:dev: |
Same here :
|
Also getting this on the latest version
|
Same for us |
link @timneutkens from your comments there, i tried using turbopack but this issue is blocking me to run next dev --turbo. I hope and trust you guys will resolve this. but this issue stands for over an year here. this is the exact error i am now seeing. |
@adarsh-drishya that error is quite different from what was initially reported in this issue. Can you open another issue with a reproduction? @codart1 that looks very similar to what is fixed in #6118 which will be landed as part of this PR on Next.js: vercel/next.js#56756 |
hi @timneutkens , i have created a reproduction for your help here in this ticket vercel/next.js#56844 |
Try with Node.js |
Hi all i having a
I tested on a next 14.0.0 (no turbo repo config) it's working with no issue at all. |
yarn dev --turbo is also failing for me on next 14 |
For me the issue was that I was using |
This comment was marked as spam.
This comment was marked as spam.
In the new learn of nextjs, if you dev start command with --turbo, calling await fetchRevenue in the example will report the same error. nextjs version 14 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
Honestly Vercel has become a joke -- I've used Next.JS since the very beginning and I've seen a huge downgrade in performance and community support in addressing these types of issues. |
Hey all, we've been making a lot of progress on these types of issues over the last 3 weeks. I just ran the /learn application and it now compiles correctly whereas it errored on 14.0.3. Please give Thanks! |
Nice, I'm no longer seeing this error in 14.0.4-canary.28! |
Still happening ….. |
Solved in canary for me too, especially supabase and supabase ssr work now. |
Next.js has greatly enhanced the full-stack development experience for many. It's hard to dispute Vercel's success in this regard. However, I do wish Next.js had opted for a more established development runner and compiler, such as Vite with ESBuild. The development experience I've had with Vite projects, particularly in terms of cold starts and hot reloads during development, is notably superior, 12 seconds for initial load with Turbo versus instant >50ms with Vite. Additionally, the compilation time and resource requirements are substantially lower with Vite. Is there any chance Next.js might consider adopting Vite in the future, or is that possibility unlikely? |
What version of Turbopack are you using?
included in next@13.0.0
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
I get the following stack trace when I start my next application with
next dev --turbo --show-all
and I try to load a page.The page doesn't load.
Expected Behavior
I would expect to be able to load a page as like when I use
next dev
.To Reproduce
Not sure how to reproduce but it might be relevant to add some context:
Reproduction Repo
No response
WEB-964
WEB-1138
The text was updated successfully, but these errors were encountered: