我试图按照https://capacitor-community.github.io/electron/#/上的说明,在一个全新的离子角度测试应用程序中添加电容共同体电子,当我需要将plaftorm作为说明添加时,一切都很好:
npx帽加@电容-社区/电子
获取下一个错误日志:
> @capacitor-community/electron@1.3.2 capacitor:add
> node dist/cap-scripts.js add
× Adding Electron platform: The "path" argument must be of type string. Received undefined
node:internal/process/promises:227
triggerUncaughtException(err, true /* fromPromise */);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:278:15)
at validateString (node:internal/validators:123:11)
at Object.join (node:path:397:7)
at Object.i [as getCwd] (C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:2:521)
at a (C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:6:197)
at Object.n [as doAdd] (C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:6:960)
at C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:12:363
at Object.g [as runTask] (C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:2:1902)
at i (C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:12:311)
at C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron\dist\cap-scripts.js:12:718 {
code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code 1
npm ERR! path C:\Users\jfont\Documents\nexus\development\ionic\NomApp\node_modules\@capacitor-community\electron
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c node dist/cap-scripts.js add
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jfont\AppData\Local\npm-cache\_logs\2020-12-21T14_34_11_950Z-debug.log
当我使用电容电子板时,它工作得很好,但它说它是被实践的,应该使用电容社区电子。
提前谢谢。
发布于 2020-12-23 08:48:29
https://stackoverflow.com/questions/65394910
复制相似问题