vue-manage-system icon indicating copy to clipboard operation
vue-manage-system copied to clipboard

linux npm run build 报错。windows 没问题。

Open wqscode opened this issue 3 years ago • 3 comments

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

wqscode avatar Nov 24 '21 08:11 wqscode

这是一封自动回复邮件。已经收到您的来信,我会尽快回复。

liliewin avatar Feb 05 '22 19:02 liliewin

已收到了···

sayid760 avatar Feb 05 '22 19:02 sayid760

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 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

首先npm i wangeditor --save装好依赖,然后将src/views/Editor.vue中的"wangEditor"改成"wangeditor"即可

cnlnn avatar Feb 05 '22 19:02 cnlnn