Giter VIP home page Giter VIP logo

verdaccio-offline-storage's People

Contributors

carlos-penton avatar ronyf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

verdaccio-offline-storage's Issues

Docker install

Any guidance on using this within a docker deployment of Verdaccio? I've tried to spin up a dockerfile a few times, but with no success. I always get an error that the plugin can't be found.

Thanks!

pull-through of new versions

i really like the feature to have all packages visible in the webui (even those not uploaded) but i'd like
to be able to still "pull-through" new version from the uplink if version is not available.

is your solution to have 2 webuis running with the same local-storage?
(and 1 webui has this plugin installed)
would that work?

Empty package list with Verdaccio v5.24.1

Hello,

Using Verdaccio v5.24.1, the package list is empty (including my previous private packages).

I am using an object configuration with the following values:

{
  [other config],
  store: {
    "offline-storage": ""
  },
}

Cannot install 2 versions of the same public package

Describe the bug
I try installing a different version of a package that was already cached by verdaccio, and it fails

To Reproduce
Install version x.0.0 of a package and then try installing version y.0.0.

npm set registry http://localhost:4873/

npm i @angular/[email protected]  # successful, updates package.json to only have version `7.0.3`.

npm i @angular/[email protected]  # fails, because version is unknown to verdaccio.

Expected behavior
Both packages are installed successfully.

Screenshots

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/[email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rony.fragin\AppData\Roaming\npm-cache\_logs\2020-09-18T22_16_05_892Z-debug.log

Configuration File (cat ~/.config/verdaccio/config.yaml)

#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#

# path to a directory with all packages
storage: /root/.local/share/verdaccio/storage

store:
  offline-storage:

# path to a directory with plugins to include
plugins: ./plugins

web:
  title: Verdaccio
  # comment out to disable gravatar support
  # gravatar: false
  # by default packages are ordercer ascendant (asc|desc)
  # sort_packages: asc
  # convert your UI to the dark side
  # darkMode: true

listen: 0.0.0.0:4873

# translate your registry, api i18n not available yet
# i18n:
# list of the available translations https://github.com/verdaccio/ui/tree/master/i18n/translations
#   web: en-US

auth:
  htpasswd:
    file: ./htpasswd
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    # max_users: 1000

# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
    timeout: 100ms
    cache: true
    fail_timeout: 1m
    max_fails: 100

packages:
  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated
    unpublish: $authenticated
    proxy: npmjs

  '**':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish/publish packages
    # (anyone can register by default, remember?)
    publish: $authenticated
    unpublish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
server:
  keepAliveTimeout: 180

middlewares:
  audit:
    enabled: true

# log settings
logs:
  - { type: stdout, format: pretty, level: http }
  #- {type: file, path: verdaccio.log, level: info}
#experiments:
#  # support for npm token command
#  token: false
#  # support for the new v1 search endpoint, functional by incomplete read more on ticket 1732
#  search: false

# This affect the web and api (not developed yet)
#i18n:
#web: en-US

Environment information

*** WARNING: Verdaccio doesn't need superuser privileges. Don't run it under root! ***

Environment Info:

  System:
    OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (2) x64 Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
  Binaries:
    Node: 10.22.0 - ~/.nvm/versions/node/v10.22.0/bin/node
    npm: 6.14.6 - ~/.nvm/versions/node/v10.22.0/bin/npm
  npmGlobalPackages:
    verdaccio: 4.8.1

Workaround
I manually go to the url
https://registry.npmjs.org/@angular/common
copy the data to the package.json in the storage folder and then it works

I ran the following python script to do it for all packages:

import json
import urllib

my_list = [<list of package names>]
BASE_DIR = '/root/.local/share/verdaccio/storage'

for item in my_list:
  data = json.loads(urllib.request.urlopen(f"https://registry.npmjs.org/{item}").read())
  with open(f'{BASE_DIR}/{item}/package.json', 'w') as outfile:
    json.dump(data, outfile)
  print(f"done - {item}")

every time I install a new version, I need to fetch the package.json again from the npm repo... how do I make verdaccio not update package.json to only contain specific versions?

edit config yaml

Im so sorry to bother you but im very new to all of this. Im failing to understand how to edit the config.yaml file. I do not seem to find it any where.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.