electron-react-tpl
electron-react-tpl copied to clipboard
bug:在win10 + wsl2环境运行错误
win10 + wsl2(ubuntu 20.04) + x410 会一直抛同一个错误 报错信息:
[umi] (node:739) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 97)
[umi] (node:739) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: chunk of umi not found.
[umi] at /home/saltfish/dkgy/maple-electron/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:104:27
[umi] at Array.forEach (<anonymous>)
[umi] at chunksToFiles (/home/saltfish/dkgy/maple-electron/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:93:14)
[umi] at /home/saltfish/dkgy/maple-electron/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:188:32
[umi] at Generator.next (<anonymous>)
[umi] at asyncGeneratorStep (/home/saltfish/dkgy/maple-electron/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:62:103)
[umi] at _next (/home/saltfish/dkgy/maple-electron/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:64:194)
[umi] at runMicrotasks (<anonymous>)
[umi] at processTicksAndRejections (internal/process/task_queues.js:97:5)
我在mabookpro上能成功启动
我解决问题了, 在 /src/render/layouts/index.ts
...
// import store from '@utils/Store/'
import store from '../utils/store'
...
不知道是不是linux下不支持 ‘@utils/Store' 这种语法导致。webpack 打包的时候会把它当成一个依赖,找不到,然后导致构建失败。没有生成相应的文件。就会有上面的报错
能确定是因为你'@utils/Store'大写了 S 因为wsl2大小写敏感,导致路径识别错误。macOS大小写不敏感 所以能正常运行。建议修改一下
@qld-cf
能确定是因为你'@utils/Store'大写了 S 因为wsl2大小写敏感,导致路径识别错误。macOS大小写不敏感 所以能正常运行。建议修改一下
收到 感谢指正