Codux Help Center
Browse our articles to find the answers you need
Install Script Error: Request Failed with "404 Not Found"
This article includes some suggestions that may help when you've tried to run an install script in Codux and got an error like the following:
1 2 3 4 5 6
yarn install v1.22.19 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... error An unexpected error occurred: "https://registry.yarnpkg.com/…": Request failed \"404 Not Found\"". info If you think this is a bug, please open a bug report with the information provided in "...\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Note:
The command in the example above uses the
yarn
package manager to install packages. Your project might fail following the use of a command for a different package manager (for example npm
or pNPM)
.Check that you can run the script outside Codux
When you run a script in Codux, it executes with the same tools used when you run the script from command line. If an install script fails in Codux, it probably means that it wouldn't work if you ran it manually either.
See if you get the same error in your terminal by running the failed script manually. In the case of the example error above, the command would be:
1
yarn install
Check that you have proper permissions
If your project includes packages from a non-public registry on npmjs.org, you first need to log in to your npmjs account before you can fetch packages from there. To check that you're logged in, run the following command from command line:
npm whoami
If you aren't logged in, run the following command to log in:
npm login
Then try running the script again. Should it still not work, check that you have the correct permissions with the project owner.
Private registries outside registry.npmjs.org
If you still can't run the script, see if your project has a .npmrc file with a custom package registry in it. This might indicate that your project replies on a private registry hosted by you (for example, a repository that uses JFROG Artifactory). If this is the case, check that you meet its access requirements. For example, some registries might require that you're inside the organization's network to access it, or that you're behind a VPN.
Was this article helpful?