cmy-MacBook-Air:project-SPH bb$ npm run serve
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/bb/project-SPH/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/bb/project-SPH/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bb/.npm/_logs/2022-03-31T12_29_26_934Z-debug-0.log
原因是没有进入package.json文件所在的文件夹
解决方法为进入下一级文件夹:
cmy-MacBook-Air:project-SPH bb$ cd app