We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/HMubaireek/nextjs-turbopack-zeebe-node
npx nx dev nextjs-with-zeebe-node --turbo
http://localhost:3000/api/zeebe
This is the error that appears:
Error: ENOENT: no such file or directory, open '[project]/node_modules/zeebe-node/dist/proto/zeebe.proto' at GET (apps/nextjs-with-zeebe-node/src/app/api/zeebe/route.ts:10:22) 8 | 9 | try{ > 10 | const zeebeClient = new ZBClient('localhost:26500'); | ^ 11 | isConnected = zeebeClient.connected; 12 | } catch (error) { 13 | console.error(error); { errno: -2, code: 'ENOENT', syscall: 'open', path: '[project]/node_modules/zeebe-node/dist/proto/zeebe.proto' }
The library used can't find a file, which is fine, but the problem is in the [project] in the path. When running with webpack instead, the error is:
[project]
webpack
Error: ENOENT: no such file or directory, open '/home/hasm/repositories/sandbox/org/apps/nextjs-with-zeebe-node/.next/proto/zeebe.proto'
So, I know which path it is looking for, and that is fixed easily with this addition to next.config.js file:
next.config.js
webpack: (config, { isServer }) => { config.plugins = [ ...(config.plugins || []), new CopyPlugin({ patterns: [ { from: '../../node_modules/zeebe-node/proto', to: 'proto', }, ], }) ]; return config; }
With this, serving the app without --turbo flag works as expected.
--turbo
I tried to put the file manually in many places but that didn't work.
So, the question is, what is this [project] in the path, and how to fix it with turbopack?
Operating System: Platform: linux Arch: x64 Version: #202409151536 SMP PREEMPT_DYNAMIC Sun Sep 15 16:01:12 UTC 2024 Available memory (MB): 47875 Available CPU cores: 12 Binaries: Node: 22.6.0 npm: 10.8.2 Yarn: 0.32+git pnpm: 9.15.2 Relevant Packages: next: 15.1.6 // Latest available version is detected (15.1.6). eslint-config-next: 15.1.6 react: 19.0.0 react-dom: 19.0.0 typescript: 5.6.3 Next.js Config: output: N/A
Turbopack
next dev (local)
protoPath: path.join(__dirname, '../../proto/zeebe.proto'),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Link to the code that reproduces this issue
https://github.com/HMubaireek/nextjs-turbopack-zeebe-node
To Reproduce
npx nx dev nextjs-with-zeebe-node --turbo
http://localhost:3000/api/zeebe
Current vs. Expected behavior
This is the error that appears:
The library used can't find a file, which is fine, but the problem is in the
[project]
in the path. When running withwebpack
instead, the error is:Error: ENOENT: no such file or directory, open '/home/hasm/repositories/sandbox/org/apps/nextjs-with-zeebe-node/.next/proto/zeebe.proto'
So, I know which path it is looking for, and that is fixed easily with this addition to
next.config.js
file:With this, serving the app without
--turbo
flag works as expected.I tried to put the file manually in many places but that didn't work.
So, the question is, what is this
[project]
in the path, and how to fix it with turbopack?Provide environment information
Operating System: Platform: linux Arch: x64 Version: #202409151536 SMP PREEMPT_DYNAMIC Sun Sep 15 16:01:12 UTC 2024 Available memory (MB): 47875 Available CPU cores: 12 Binaries: Node: 22.6.0 npm: 10.8.2 Yarn: 0.32+git pnpm: 9.15.2 Relevant Packages: next: 15.1.6 // Latest available version is detected (15.1.6). eslint-config-next: 15.1.6 react: 19.0.0 react-dom: 19.0.0 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The text was updated successfully, but these errors were encountered: