Closed dugufu closed 3 months ago
My project construction also encountered this issue
My project construction also encountered this issue
大哥你是 本地build 还是上面build的时候出问题 我刚刚解决了
For my package.json
{ "vite": "^4.5.1", "vite-plugin-ejs": "^1.7.0", "vite-plugin-top-level-await": "^1.4.1" //update this to latest version }
Then rm -r node_modules/ Then run build again
For my case I cant build dist on githubaction via my yml.file
production.yml
name: Publish Panel Prod
on:
workflow_dispatch:
push:
tags:
- panel-prod-v*
paths:
- packages/panel/**
jobs:
deploy:
name: Preview Panel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 **use this version**
- name: Setup Nodejs and yarn with cache
uses: actions/setup-node@v4 **update this**
with:
node-version: "18"
- uses: pnpm/action-setup@v2 **use this version**
name: Install pnpm
id: pnpm-install
with:
version: 9 **use this version**
run_install: false
- name: Install dependencies
working-directory: "packages"
run: cd backend && pnpm i && cd ../panel && pnpm i
- name: Build
working-directory: "packages/panel"
run: pnpm run build:prod
- name: Publish
uses: cloudflare/wrangler-action@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN_PROD }}
accountId: ${{ secrets.CF_ACCOUNT_ID_PROD }}
workingDirectory: "packages/panel/dist"
command: pages publish spa --project-name=abc--commit-hash $GITHUB_SHA --branch main
At the end I use correct version and change the yml to correct version then fixed
worked for me
pnpm i -D @swc/core@~1.6.0
我也出现这个情况了 本地build 前段时间还是好的
@z100h100 @swc/core
今天发了 1.7.0 版本,应该是有些不兼容
你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
@F-loat 好的 我暂时先去掉这个了
I faced to the same issue. I use pnpm, adding this to the package.json to temporary fix:
"pnpm": {
"overrides": {
"@swc/core": "1.6.0"
}
}
You can do similar with other package managers until this plugin has a proper fix.
i have the same issue
I recommend locking the swc/core version in this package or investigating whether this is a bug in swc
.
现在有解决方案吗,我目前也遇到这个问题😭
留个名 我也遇到了
package.json 固定@swc/core版本为1.6.13
{ "resolutions": { "**/vite-plugin-top-level-await/@swc/core": "1.6.13" } }
删除node_modules,然后install
留个名 我也遇到了
现在有解决方案吗,我目前也遇到这个问题😭
留个名,我也遇到了
headache :(
me to @swc/core 1.7 不兼容 回退版本
The definition of ctxt
field is missing from SWC's typing definitions... I tested and added the field to everywhere the latest SWC requires. I have no time to fix it for SWC...
Pushed v1.4.2
, which should have this issue fixed.
worked for me
pnpm i -D @swc/core@~1.6.0
确实是版本问题
你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。