Website-Server Hosting and SEO Knowledge Base

HomeKnowledge BaseGeneral HostingNode.js How-tos, Tutorials, ...How to Fix Node.js Error Mes...

How to Fix Node.js Error Message Spawn Yarn ENOENT

Quickly Learn How to Fix the Node.js Message "spawn yarn ENOENT."

 

When installing the Ghost CMS via NPM and a command line on Linux and Ubuntu, users may run into the error/message:

  • spawn yarn ENOENT
  • Exit code: ENOENT
  • npm ERR! Error: ENOENT
  • spawn ENOENT

 

After running the Ghost CMS install command of:

ghost install local

✔ Checking system Node.js version
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for the latest Ghost version
✔ Setting up install directory
✖ Downloading and installing Ghost v3.41.6
A ProcessError occurred.

 

Message: spawn yarn ENOENT
Exit code: ENOENT

 

To prevent this npm error(s) from occurring the next time the Ghost CMS install command is run, run the following command:

npm config set scripts-prepend-node-path auto

 

If this command does not work, you can try the following npm command.

npm config set scripts-prepend-node-path true

 

Once this command has been run, the error should go away from now on.

 

A few other commands are known to fix the npm Ghost CMS install error message ENOENT include.

npm cache clean
sudo npm cache clean



To mannually perfom the above command, SSH into your server and under the user home are, find the hidden file of .npmrc and add the following ocde to the file and save/exist.


scripts-prepend-node-path=true

Are you having a difficult time finding the information you are looking for?

Create a Rackwoo Support Ticket
Did you find this article useful?
(Article viewed 27 times / 0 clients found this article helpful)

Top