项目如下:https://github.com/rietesh/Hyperledgerfabric-Airline-App.git
当我运行npm时,start出现:
The serve command requires to be run in an Angular project, but a project definition could not be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Airline-App@0.0.1 start: `ng serve --proxy-config proxy.conf.js --host 0.0.0.0`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Airline-App@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersJ. MiguelAppDataRoamingnpm-cache_logs2021-09-21T14_46_30_159Z-debug.log
我快速查看了一下上述项目,这不是一个Angular项目(package.json
中没有对@angular的依赖,根目录中也没有angular.json
)。也没有start
靶包。json, npm runcommand
(这里是start
),必须在package.json
中指定,而这里不是这样。
这就是为什么你必须在运行npm run start之前导航到Airline-App文件夹!这个文件夹确实是一个Angular应用,并且有一个Angular。json,开始目标。
cd Airline-App
npm run start