我正在尝试升级我的aurelia.json文件,以便在ASP.NET Core项目中将v0.20.2更改为v0.23.0。
我已经通过npm install requirejs text --save
安装了requirejs和text包,它们现在是外部依赖项。
当我替换旧版本时,所有更改都正常工作,文本插件除外:
{
"name": "text",
"path": "../wwwroot/scripts/text"
}
根据更改日志备注使用字符串“text”,我从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)
知道如何修复此错误,还是可以继续使用以前的配置?
答案 0 :(得分:1)
我发现了问题。我安装了错误的NPM软件包,应该是requirejs/text
,而不是text
,所以我的软件包更新脚本是npm install requirejs requirejs/text --save
。
我发现这非常令人困惑,因为他是NPM的新手。