收藏
回答

【开发者工具报错】当分包路径存在 `-` 字符 & 开发者工具打开‘本地编译时进行合并编译’

问题模块 框架类型 问题类型 操作系统 工具版本
开发者工具 小程序 Bug macOS 1.02.1911262

条件:

当分包路径存在 `-` 字符 & 开发者工具打开‘本地编译时进行合并编译’

报错:

VM52:1 ENOENT: no such file or directory, open '/Users/hujin/WeChatProjects/minicode-3/__SUB__/bug-test/appservice.js'
Error: ENOENT: no such file or directory, open '/Users/hujin/WeChatProjects/minicode-3/__SUB__/bug-test/appservice.js'
    at Object.openSync (fs.js:447:3)
    at Object.readFileSync (fs.js:349:35)
    at Object.n.readFileSync (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/js/unpack/hackrequire/index.js:1:1216)
    at FileUtils.getFile (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/8e2026561e71ea67df211489b756510c.js:385:41)
    at o (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/81a45c52b8b2dedcaa34d05c772d10f0.js:1:1199)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Proxy.exports.default (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/81a45c52b8b2dedcaa34d05c772d10f0.js:1:2399)
    at async Proxy.exports.compileMiniProgramJS (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/d7959893394997a84922a4171f531a12.js:1:221)
    at async Proxy.module.exports (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/87c0ac209c25d8bb448550638bb17663.js:1:988)
    at async o (/Users/hujin/Library/Application Support/微信开发者工具/WeappCode/package.nw/core.wxvpkg/94280b099bf2ed3aafc1f5e43519f037.js:17:384)
console.error @ VM52:1
(anonymous) @ VM68:2
VM58 WAService.js:1 Uncaught Error: module "bug-test/index.js" is not defined
    at require (VM58 WAService.js:1)
    at <anonymous>:1103:9
    at HTMLScriptElement.scriptLoaded (<anonymous>:1144:12)
    at HTMLScriptElement.script.onload (<anonymous>:1155:20)


最后一次编辑于  11-28
回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员-小柿子
    社区技术运营专员-小柿子
    11-28

    编译时候报错?

    11-28
    赞同
    回复 1
    • 胡晋
      胡晋
      11-28
      不是编译时报错,是访问时报错。可以看下代码片段,直接访问 bug-test/index
      11-28
      回复
问题标签