vue-manage-system
vue-manage-system copied to clipboard
linux npm run build 报错。windows 没问题。
root@3eaf391a7033:/www# npm run build
[email protected] build vite build
vite v2.3.7 building for production...
✓ 25 modules transformed.
[vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:
Error: [vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at onRollupWarning (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45502:19)
at onwarn (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45292:13)
at Object.onwarn (/www/node_modules/rollup/dist/shared/rollup.js:20286:13)
at ModuleLoader.handleResolveId (/www/node_modules/rollup/dist/shared/rollup.js:19641:26)
at /www/node_modules/rollup/dist/shared/rollup.js:19588:22
at async Promise.all (index 0)
at async ModuleLoader.fetchStaticDependencies (/www/node_modules/rollup/dist/shared/rollup.js:19586:34)
at async Promise.all (index 0)
at async ModuleLoader.fetchModule (/www/node_modules/rollup/dist/shared/rollup.js:19562:9)
at async /www/node_modules/rollup/dist/shared/rollup.js:19535:48
这是一封自动回复邮件。已经收到您的来信,我会尽快回复。
已收到了···
root@3eaf391a7033:/www# npm run build
[email protected] build vite build
vite v2.3.7 building for production... ✓ 25 modules transformed. [vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build: Error: [vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it tobuild.rollupOptions.external
at onRollupWarning (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45502:19) at onwarn (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45292:13) at Object.onwarn (/www/node_modules/rollup/dist/shared/rollup.js:20286:13) at ModuleLoader.handleResolveId (/www/node_modules/rollup/dist/shared/rollup.js:19641:26) at /www/node_modules/rollup/dist/shared/rollup.js:19588:22 at async Promise.all (index 0) at async ModuleLoader.fetchStaticDependencies (/www/node_modules/rollup/dist/shared/rollup.js:19586:34) at async Promise.all (index 0) at async ModuleLoader.fetchModule (/www/node_modules/rollup/dist/shared/rollup.js:19562:9) at async /www/node_modules/rollup/dist/shared/rollup.js:19535:48
root@3eaf391a7033:/www# npm run build
[email protected] build vite build
vite v2.3.7 building for production... ✓ 25 modules transformed. [vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build: Error: [vite]: Rollup failed to resolve import "wangEditor" from "src/views/Editor.vue". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it tobuild.rollupOptions.external
at onRollupWarning (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45502:19) at onwarn (/www/node_modules/vite/dist/node/chunks/dep-bc228bbb.js:45292:13) at Object.onwarn (/www/node_modules/rollup/dist/shared/rollup.js:20286:13) at ModuleLoader.handleResolveId (/www/node_modules/rollup/dist/shared/rollup.js:19641:26) at /www/node_modules/rollup/dist/shared/rollup.js:19588:22 at async Promise.all (index 0) at async ModuleLoader.fetchStaticDependencies (/www/node_modules/rollup/dist/shared/rollup.js:19586:34) at async Promise.all (index 0) at async ModuleLoader.fetchModule (/www/node_modules/rollup/dist/shared/rollup.js:19562:9) at async /www/node_modules/rollup/dist/shared/rollup.js:19535:48
首先npm i wangeditor --save
装好依赖,然后将src/views/Editor.vue中的"wangEditor"改成"wangeditor"即可