Reputation: 103
I create react app with create-react-app and install react-admin . when I want to start development server with yarn start throw an error unhand-led 'error' event and say Command failed with exit code 1 I search a lot but nothing helped. See the error in the below image
Upvotes: 10
Views: 66545
Reputation: 39
I faced this issue and tried almost all solution in the net, for 5 hours, I was struggling but at last I ran into this solution it it solved thi issue.
simply try this: $ npm install --save --save-exact [email protected]
this should work.
Upvotes: 0
Reputation: 1125
I managed to fixed it Yarn "Failed with errors" with the following. (Source)
> yarn install
> npm install -g yarn
> yarn set version berry
Commit your changes:
> git status
> git add .
> git commit -m "upgraded yarn"
Run Yarn :
> yarn -v
3.2.4
> yarn install
Upvotes: -1
Reputation: 109
Here's what worked for me:
Upvotes: -1
Reputation: 375
I've just restarted the terminal and yarn start'
worked for me.
I'm using Ubuntu 18.04. I've tried the solutions given in the following posts, but they didn't help.
Upvotes: -1
Reputation: 69
It seems to install babel changed many nodes, yet it did NOT update the yarn.lock
and package.json
files accordingly
yarn info
Then run
yarn upgrade
Then
yarn add yarn
Upvotes: 3
Reputation: 156
yarn info
which actually failed
then I run
=> yarn upgrade
which took 5 minutes or more to complete
then finally I run
=> yarn add yarn
after this, I was able to start my server successfully by running my own script yar
Upvotes: -1
Reputation: 567
All right, look carefully at this:
{
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/s', '/c', 'start', '""', '/b', '"http://localhost:3000/"' ]
}
errno: 'ENOENT'
means the file or directory is not foundpath: 'cmd'
denotes the executable cmd
was not found locally or globally while spawning process cmd
via Node.js$PATH
. The executables inside directories mentioned in the $PATH
can be accessed from anywhere on your system. 'C:\Windows\system32'
is a path where windows keeps some critical executables. cmd.exe
is one of them. Somehow the path was deleted from the $PATH variable. In order to fix the problem, an easy solution is:
start-menu
-> search
and type environment variables
and open itC:\Windows\system32
to it and press OK. If you're on Windows 7 or below, add a semi-colon ;
before itUpvotes: 4