构建vite项目时分配到右值错误

时间:2021-04-06 15:41:57

标签: vite

我在 https://github.com/enixam/js-notebook/tree/web-only 有一个 vite + react + ts 项目。运行 { "id": "3", "property_country": "canada", "property_name": "good motel", "property_stars": "4", "property_city": "montreal", "property_region": "montreal", "property_type": "camp", "date_created": "3563763673", "date_updated": "33377363", "the_user_id": "1" } 生成错误 tsc && vite build

SyntaxError: Assigning to rvalue

➜ js-notebook git:(main) yarn build yarn run v1.22.10 $ tsc && vite build vite v2.1.3 building for production... ✓ 1 modules transformed. [rollup-plugin-dynamic-import-variables] Assigning to rvalue (11:75) file: vite/dynamic-import-polyfill:11:75 error during build: SyntaxError: Assigning to rvalue (11:75) at Object.pp$4.raise (D:\learn-web\react\js-notebook\node_modules\rollup\dist\shared\rollup.js:15626:13) at Object.pp$2.toAssignable (D:\learn-web\react\js-notebook\node_modules\rollup\dist\shared\rollup.js:14333:12) at Object.pp$2.toAssignable (D:\learn-web\react\js-notebook\node_modules\rollup\dist\shared\rollup.js:14298:12) at Object.pp$2.toAssignable (D:\learn-web\react\js-notebook\node_modules\rollup\dist\shared\rollup.js:14280:12) at Object.pp$2.toAssignableList (D:\learn-web\react\js-notebook\node_modules\rollup\dist\shared\rollup.js:14345:21) at Object.pp$2.toAssignable (D:\learn-web\react\js-note 文件

package.json

{ "name": "js-notebook", "version": "0.0.0", "scripts": { "dev": "vite", "build": "tsc && vite build", "serve": "vite preview" }, "dependencies": { "@monaco-editor/react": "^4.1.0", "@reduxjs/toolkit": "^1.5.1", "@uiw/react-md-editor": "2.1.1", "axios": "^0.21.1", "bulmaswatch": "^0.8.1", "localforage": "^1.9.0", "prettier": "^2.2.1", "react": "^17.0.0", "react-dom": "^17.0.0", "react-redux": "^7.2.3", "react-resizable": "^1.11.1", "redux": "^4.0.5" }, "devDependencies": { "@types/prettier": "^2.2.3", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/react-redux": "^7.1.16", "@types/react-resizable": "^1.7.2", "@vitejs/plugin-react-refresh": "^1.3.1", "esbuild-wasm": "^0.11.0", "monaco-editor": "^0.23.0", "typescript": "^4.1.2", "vite": "^2.1.3" }, "license": "MIT" } 的输出:

npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers

0 个答案:

没有答案