我该如何解决这两个错误?当我输入npm start
时,出现此错误:
error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! fuse-react-app@3.1.0 start: `yarn run tailwind && react-scripts start` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the fuse-react-app@3.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! A complete log of this run can be found in: npm ERR! /Users/comuterscience/.npm/_logs/2019-09-27T09_32_09_211Z-debug.log muddi:TjenerTeam_FrontEnd-master computerscience$
如果我输入npm install
,则会出现此错误:
npm ERR! code ETARGET npm ERR! notarget No matching version found for save-dev@^2.0.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget npm ERR! notarget It was specified as a dependency of 'TjenerTeam_FrontEnd-master' npm ERR! notarget npm ERR! A complete log of this run can be found in: npm ERR! /Users/comuterscience/.npm/_logs/2019-09-27T09_38_45_318Z-debug.log muddi:TjenerTeam_FrontEnd-master computerscience$
我该怎么办?
答案 0 :(得分:0)
这似乎是因为您使用的是npm的旧版本。要将其升级到较新版本,请删除文件“ package-lock.json”并运行“ npm install”。