hbuilderx 小程序分包_HbuilderX微信小程序打包失败

在尝试使用HbuilderX打包小程序时遇到问题,虽然通过`npm run dev:mp-weixin`可以正常运行,但在执行`npm run build mp-weixin`进行打包时遭遇失败。错误显示为找不到入口模块。这可能是配置问题或路径错误导致,需要检查项目配置及mp-weixin平台的相关设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目使用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"

当前项目编译模式:自定义组件模式。编译模式差异见:https://ask.dcloud.net.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/2019-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/2019-05-31T10_26_35_580Z-debug.log

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值