运行“craco build”时出错
执行命令:
npm run dist
npm run build
如果我从同一个文件夹运行,这是同样的错误。
package.json 文件中的命令:
"scripts": {
"start": "npm run storybook:start",
"dev": "craco start",
"build": "craco build",
"dist": "npm run build && del-cli build/*.* build/fonts",
"test": "craco test",
"lint": "eslint . --ext .js,.jsx --ignore-path .gitignore",
"eject": "react-scripts eject",
-----------------
错误输出
craco build
'craco' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
如果我通过运行检查 craco 版本,npm info craco version
那么我会收到0.0.3
. 我正在运行节点 v8.0.0,npm 版本是 5.0.0
由于某些项目特定条件,我在节点 v8.0.0 上。