npm ERR ELIFECYCLE and ETARGET

问题描述 投票:0回答:1

我该如何解决这两个错误?当我输入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! [email protected] start: 

    `yarn run tailwind && react-scripts start`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] 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$ 

我该怎么办?

node.js npm npm-install npm-scripts npm-start
1个回答
0
投票

看来是因为您使用的是npm的旧版本。要将其升级到较新版本,请删除文件“ package-lock.json”并运行“ npm install”。

© www.soinside.com 2019 - 2024. All rights reserved.