thread 'tokio-runtime-worker' panicked when adding `@svgr/webpack` to `turbopack`
Unanswered
Paul posted this in #help-forum
PaulOP
Hello, when I try to add
Then it results in the following error when loading a page with and svg
Do you have any idea why this might happen?
@svgr/webpack
to my turbo config, eg:turbopack: {
rules: {
"*.svg": {
as: "*.js",
loaders: ["@svgr/webpack"],
},
},
},
Then it results in the following error when loading a page with and svg
thread 'tokio-runtime-worker' panicked at /Users/geist/dev/actions-runner/_work/next.js/next.js/turbopack/crates/turbo-tasks-backend/src/backend/mod.rs:2172:9:
Persistent task <EvaluationIssue as Issue>::description is not allowed to call or read transient tasks FileSystemPath::fs. The callee is transient because it depends on:
FileSystemPath::fs
Do you have any idea why this might happen?
2 Replies
PaulOP
I think I found the related issue, when you install the
I will create a reproduction and post it to github
debug
package, and use set DEBUG="XXX" in your .env, it causes the following: ✓ Compiled / in 2.6s
⨯ ./app/next.svg
Error evaluating Node.js code
TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
[at Function.save (/private/tmp/reproduction-app/node_modules/debug/src/node.js:205:21)]
[at Function.enable (/private/tmp/reproduction-app/node_modules/debug/src/common.js:163:15)]
[at setup (/private/tmp/reproduction-app/node_modules/debug/src/common.js:287:14)]
[at Object.<anonymous> (/private/tmp/reproduction-app/node_modules/debug/src/node.js:240:37)]
[at Module._compile (node:internal/modules/cjs/loader:1562:14)]
[at Object..js (node:internal/modules/cjs/loader:1699:10)]
[at Module.load (node:internal/modules/cjs/loader:1313:32)]
[at Function._load (node:internal/modules/cjs/loader:1123:12)]
[at TracingChannel.traceSync (node:diagnostics_channel:322:14)]
[at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)]
./app/page.tsx:1:1
Export default doesn't exist in target module
> 1 | import NextLogo from "./next.svg";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | export default function Home() {
3 | return (
4 | <div>
The export default was not found in module [project]/app/next.svg.js [app-rsc] (ecmascript).
The module has no exports at all.
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.
I will create a reproduction and post it to github
PaulOP
Issue created here: https://github.com/vercel/next.js/issues/78804