1

I used "npm install npmtest" command to download my test private package. But there was no package downloaded in my project directory. After that, I used "npm install jquery" to download jquery plugin, but the plugin was only downloaded to verdaccio's storage too, there was not jquery plugin in my project directory.

verdaccio config file

storage: ./storage
plugins: ./plugins

web:
  title: Verdaccio

auth:
  htpasswd:
    file: ./htpasswd

uplinks:
  cnpmjs:
    url: https://registry.npm.taobao.org/

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

  '**':
    access: $all

    publish: $authenticated

    proxy: cnpmjs

middlewares:
  audit:
    enabled: true

logs:
  - {type: stdout, format: pretty, level: http}

Info after executing npm install

enter image description here

The test2 directory was still empty. Can anyone tell me why is that? Thank you.

robsch
  • 9,358
  • 9
  • 63
  • 104
ChenLee
  • 1,371
  • 3
  • 15
  • 33

1 Answers1

0

The output doesn't indicate where in the filesystem your test2 directory is, but the log messages show that the working directory for npm was /Users/lc/Documents/study, so the most likely reason that test2 is empty is that it is a subdirectory of study and study has a .npmrc or something else that caused npm to detect that as being the root of the project, so the file you are looking for ended up in /Users/lc/Documents/study/node_modules/jquery.

Jason Kohles
  • 597
  • 5
  • 12