错误描述:
NW.js应用使用nw-builder构建打包时,报错:The promise rejected with the reason "Could not find a package.json in your src folder".] {code: 'ERR_UNHANDLED_REJECTION'}
具体报错日志如下:
D:\whw\study\nwjs\test2>npm run build
> firstapp@1.0.0 build
> nwbuild src/ --platforms win32,win64,osx64,linux32,linux64 --buildDir dist/
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: 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(). The promise rejected with the reason "Could not find a package.json in your src folder".] {
code: 'ERR_UNHANDLED_REJECTION'
}
D:\whw\study\nwjs\test2>