vue3线上项目拉取下来,启动报错
PS C:\work\web\zker-student-ui> pnpm build:test
> website@0.0.0 build:test C:\work\web\zker-student-ui
> vite build --mode test
vite v2.9.7 building for test...
transforming (247) node_modules\@babel\runtime\helpers\interopRequireDefault.js
new URL(`/src/assets/imgs/business-bg@2x.png`, import.meta.url) doesn't exist at build time, it will remain unchanged to be resolved at runtime
new URL(`/src/assets/imgs/home/ability2x_01.png`, import.meta.url) doesn't exist at build time, it will remain unchanged to be resolved at runtime
✓ 501 modules transformed.
[commonjs] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
error during build:
Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "@intlify/shared" package
at packageEntryFailure (C:\work\web\zker-student-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:40672:11)
at resolvePackageEntry (C:\work\web\zker-student-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:40668:9)
at tryNodeResolve (C:\work\web\zker-student-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:40475:20)
at Object.resolveId (C:\work\web\zker-student-ui\node_modules\vite\dist\node\chunks\dep-88bd5805.js:40283:28)
at C:\work\web\zker-student-ui\node_modules\rollup\dist\shared\rollup.js:22834:37
ELIFECYCLE Command failed with exit code 1.
不知道原因
想要正常把项目跑起来即可
是不是有包没拉下来呢?
再重新装一下试试,运行 npm install 或者 cnpm install 试试 有cnpm的话优先用cnpm
问题是出在 /src/assets/imgs/business-bg@2x.png 这张图片的引入那边吧 你全局搜一下它 business-bg@2x.png 的引入