When installing the Ghost CMS via NPM and a command line on Linux and Ubuntu, users may run into the error/message:
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.