Error upgrading text plugin for Aurelia CLI 0.20.2 -> 0.23.0

流过昼夜 提交于 2020-03-06 04:24:12

问题


I'm trying to upgrade my aurelia.json file for changes from v0.20.2 to v0.23.0, within an ASP.NET Core project.

I've installed the requirejs and text packages via npm install requirejs text --save, which are now external dependencies.

All changes are working fine, except for the text plugin, when I replace the old version:

{
    "name": "text",
    "path": "../wwwroot/scripts/text"
}

with the string "text" as per the changelog notes, I get this error from au build:

2>  Starting 'readProjectConfiguration'...
2>  { uid: 1,
2>    name: 'readProjectConfiguration',
2>    branch: false,
2>DNX : error :
2>     TypeError: Path must be a string. Received undefined
2>         at assertPath (path.js:7:11)
2>         at Object.join (path.js:466:7)
2>         at determineLoaderConfig (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:57:31)
2>         at loadPackageMetadata.then (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:15:19),
2>    duration: [ 0, 13672805 ],
2>    time: 1481183098363 }
2>  { uid: 0,
2>    name: '<series>',
2>    branch: true,
2>DNX : error :
2>     TypeError: Path must be a string. Received undefined
2>         at assertPath (path.js:7:11)
2>         at Object.join (path.js:466:7)
2>         at determineLoaderConfig (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:57:31)
2>         at loadPackageMetadata.then (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:15:19),
2>    duration: [ 0, 26563957 ],
2>    time: 1481183098375 }
2>  TypeError: Path must be a string. Received undefined
2>      at assertPath (path.js:7:11)
2>      at Object.join (path.js:466:7)
2>      at determineLoaderConfig (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:57:31)
2>      at loadPackageMetadata.then (C:\Source\Octet.Platform\Octet.Portal\node_modules\aurelia-cli\lib\build\package-analyzer.js:15:19)

Any idea how to fix this error, or can I just continue to use the previous configuration?


回答1:


I found the problem. I installed the wrong NPM package, it should have been requirejs/text, NOT text, so my package update script is npm install requirejs requirejs/text --save.

I found this pretty confusing as someone new to NPM.



来源:https://stackoverflow.com/questions/41034339/error-upgrading-text-plugin-for-aurelia-cli-0-20-2-0-23-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!