Closed Tiscs closed 2 months ago
I updated @swc/core
to the latest version 1.3.107, and the problem still exists.
Reproducing here
Confirmed this doesn't happen with version 1.3.105
It started happening in 1.3.106 and confirmed also in 1.3.107
I am now getting this error in Next.js after updating to 14.2.0. It seems like Next.js got updated to this version of SWC and the plugin is unusable with Next.js now.
Hi there!
Thanks for reporting.
Can you provide a reproduction with latest releases of packages?
Hi there!
Thanks for reporting.
Can you provide a reproduction with latest releases of packages?
Verified that it works fine when using @swc-jotai/debug-label@0.1.1
and @swc/core@1.5.29
(both are the latest versions).
Perfect fix, thanks.
I don't know where I am supposed to file this issue. I am still receiving the error above with a fresh vite install.
@swc-jotai/debug-label@0.1.1 @swc/core@1.7.19
npm explain @swc/core
# @swc/core@1.7.19 dev
# node_modules/@swc/core
# @swc/core@"^1.5.7" from @vitejs/plugin-react-swc@3.7.0
# node_modules/@vitejs/plugin-react-swc
# dev @vitejs/plugin-react-swc@"^3.5.0" from the root project
npm create vite@latest jotai-debug-label -- --template react-swc-ts && \
cd jotai-debug-label && npm install && npm install --save-dev @swc-jotai/debug-label
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react({ plugins: [["@swc-jotai/debug-label", {}]] })]
})
{
"name": "jotai-debug-label",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"jotai": "^2.9.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@swc-jotai/debug-label": "^0.1.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
}
}
The error message.
thread '<unnamed>' panicked at /Users/thisen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rkyv-0.7.44/src/impls/core/mod.rs:266:67:
called `Result::unwrap()` on an `Err` value: LayoutError
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/swc-0.285.0/src/plugin.rs:169:14:
failed to invoke plugin: failed to invoke plugin on 'Some("/home/tom/code/test/jotai-debug-label/src/main.tsx")'
Hi, it’s great to learn and practice this project.
After I updated @swc/core in my vite-based project to version 1.3.106, when running vite dev, I got the following error message in the console:
More with `RUST_BACKTRACE=1`
``` sh thread 'It works fine on @swc/core@1.3.105.
Any incompatibilities there?
Thanks.