Skip to content

404 Not Found - GET https://registry.npmjs.org/website-common - Not found #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonatino opened this issue Apr 24, 2020 · 4 comments
Closed

Comments

@jonatino
Copy link

jonatino commented Apr 24, 2020

I'm trying to use this action to setup my node project which uses some private library in my github packages.

Here is my action script:

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/@InsigniaRSPS/
          scope: '@website-common'
      - name: Install dependencies
        working-directory: ./web
        run: npm install --ignore-scripts -no-cache
        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

The .npmrc file gets created with the following contents:

//npm.pkg.github.com/@InsigniaRSPS/:_authToken=${NODE_AUTH_TOKEN} @website-common:registry=https://npm.pkg.github.com/@InsigniaRSPS/ always-auth=false

When I test locally on my pc with the same .npmrc file, it works fine. But on github actions it fails with the following error:

npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/extra/ar-OM.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/global/ar-OM.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/ar-PS.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/localize-3f114091/src/tools/src/translate/source_files/locale_plugin.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/extra/ar-PS.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/service-worker-d5ae7dbe/fesm2015/service-worker.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/global/ar-PS.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/ar-QA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/extra/ar-QA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/global/ar-QA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/ar-SA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/extra/ar-SA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/global/ar-SA.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/ar-SD.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/extra/ar-SD.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/global/ar-SD.js'
npm WARN tar ENOENT: no such file or directory, open '/home/runner/work/launcher/launcher/web/node_modules/.staging/@angular/common-6412cc2d/locales/ar-SO.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/work/launcher/launcher/web/false/_logs/2020-04-24T01_32_45_901Z-debug.log
##[error]Process completed with exit code 1.
@bryanmacfarlane
Copy link
Member

I think on your machine it's in your npm cache but on the hosted machine, it's a fresh machine everytime.

So I think it's error report was correct:

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!)

@bryanmacfarlane
Copy link
Member

It also looks as if that output is coming from npm install and not the setup-node step. Is that correct?

@jonatino
Copy link
Author

@bryanmacfarlane it works with -no-cache on my machine as well. Yeah it fails during the npm install when it goes to grab the script. But the setup is responsible for setting the .npmrc file which the install step uses.

@bryanmacfarlane
Copy link
Member

Thanks @jonatino - If you believe there's code changes this repo can make to help, we can re-open. Let me know.

deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants