ironman
ironman

Reputation: 1066

Error on running build command through npm run for reactjs project

Getting error on running "craco build"

Executing command:

npm run dist

It's the same error if I run npm run build from same folder.

Commands in package.json file:

"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",
-----------------

Error Output

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

If I check the craco version by running npm info craco version then I receive 0.0.3. I am running node v8.0.0 and npm version is 5.0.0

I am on node v8.0.0 because of some project specific conditions.

Upvotes: 2

Views: 5945

Answers (1)

Revan99
Revan99

Reputation: 446

use this command

npm install @craco/craco --save

Upvotes: 3

Related Questions