项目使用npm run dev:mp-weixin可以运行成功,但打包时npm run build mp-weixin出现如下错误。package.json请见附件。
kaibanshenqi@0.2.0 build /Users/tony/Documents/kaibanshenqi
npm run build:mp-weixin "mp-weixin"
kaibanshenqi@0.2.0 build:mp-weixin /Users/tony/Documents/kaibanshenqi
cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build "mp-weixin"
当前项目编译模式:自定义组件模式。编译模式差异见:.cn/article/35843
⠙ 开始编译当前项目至 mp-weixin 平台...Starting type checking service...
Using 1 worker with 2048MB memory limit
⠇ 开始编译当前项目至 mp-weixin 平台...
ERROR Failed to compile with 1 errors 18:26:35
error
Entry module not found: Error: Can't resolve '/Users/tony/Documents/kaibanshenqi/mp-weixin' in '/Users/tony/Documents/kaibanshenqi'
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kaibanshenqi@0.2.0 build:mp-weixin: cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build "mp-weixin"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kaibanshenqi@0.2.0 build:mp-weixin script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/-05-31T10_26_35_534Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kaibanshenqi@0.2.0 build: npm run build:mp-weixin "mp-weixin"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kaibanshenqi@0.2.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/-05-31T10_26_35_580Z-debug.log