Github Actions npm install 404 When Trying to Use Github Packages Registry

I’m trying to add actions integration for one of my npm projects which depend on a package I have inside github packages.

Here is my actions file:

name: Launcher Build/Publish

on:
push:
branches: [master]
pull\_request:
branches: [master]

jobs:
build-and-publish:

runs-on: ubuntu-latest

steps:
-uses: actions/checkout@v2
-name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
-name: Use Node.js 12.8
uses: actions/setup-node@v1
with:
node-version: 12.8
registry-url: https://npm.pkg.github.com/
scope:'@Underos'  
-name: Install dependencies
working-directory: ./web
run: npm install --ignore-scripts
env:
NODE\_AUTH\_TOKEN: ${{secrets.GITHUB_TOKEN}}
-name: Lint
working-directory: ./web
run: npm run lint
-name: Build
working-directory: ./web
run: npm run prod

This is the output from the npm-install step.

npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/platform-browser-dynamic-db9e868d/esm2015/src/private_export.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/platform-browser-dynamic-db9e868d/esm2015/src/resource_loader'
npm WARN tar ENOENT: no such file or directory, lstat '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/platform-browser-dynamic-db9e868d/esm2015/src/resource_loader'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/platform-browser-dynamic-db9e868d/esm2015/testing/src/testing.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/platform-browser-dynamic-db9e868d/esm2015/src/version.js'
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/website-common - Not found
npm ERR! 404
npm ERR! 404 'website-common@0.0.9' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'web'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-04-21T21_06_36_527Z-debug.log
##[error]Process completed with exit code 1.

I’m not sure why it’s getting a 404 since I register the registry url in the setup node step.

Any ideas?

@jonatino ,

Please try adding the following command before the npm install to see if the problem can be solved:

npm config set registry http://registry.npmjs.org

If the problem still exists, could you please share  your repository with us so that we can investigate this problem further?

@brightran wrote:

@jonatino ,

Please try adding the following command before the npm install to see if the problem can be solved:

npm config set registry http://registry.npmjs.org

 

If the problem still exists, could you please share  your repository with us so that we can investigate this problem further?

I’m not sure how that would fix the problem? The problem is that its not looking inside my github package repository to get the website-common project.

@jonatino ,

Have you try the command I mentioned above? Does it work?

If the problem still exists, please share your repository with us so that we can check more detailed configurations to analyze the root cause. thanks.

I am facing same issue. It seems my pipeline failed while doing npm i . However, working fine when we do on local or any other CI/CD pipeline.

npm WARN tar ENOENT: no such file or directory, open '/home/runner/work///node_modules/.staging/core-js-57041121/features/README.md'

[1947](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1947)npm WARN tar ENOENT: no such file or directory, open '/home/runner/work///node_modules/.staging/core-js-57041121/internals/README.md'

[1948](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1948)npm WARN tar ENOENT: no such file or directory, lstat '/home/runner/work///node_modules/.staging/core-js-57041121/modules'

[1949](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1949)npm WARN tar ENOENT: no such file or directory, open '/home/runner/work///node_modules/.staging/core-js-57041121/README.md'

[1950](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1950)npm WARN tar ENOENT: no such file or directory, open '/home/runner/work///node_modules/.staging/core-js-57041121/stable/README.md'

[1951](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1951)npm WARN tar ENOENT: no such file or directory, open '/home/runner/work///node_modules/.staging/core-js-57041121/stage/README.md'

[1952](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1952)npm WARN tar ENOENT: no such file or directory, lstat '/home/runner/work///node_modules/.staging/core-js-57041121/web'

[1953](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1953)

[1954](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1954)npm ERR! A complete log of this run can be found in:

[1955](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1955)npm ERR! /home/runner/.npm/_logs/2021-12-15T17_25_41_005Z-debug.log

[1956](https://github.com//runs/4537494293?check_suite_focus=true#step:5:1956)Error: Process completed with exit code 1.