0

i did an npm link to my node package for generating password. however, after npm link and it throws these error:

npm WARN saveError ENOENT: no such file or directory, open '/Users/valeryfun/package.json'

npm WARN enoent ENOENT: no such file or directory, open '/Users/valeryfun/package.json'

i've included bin and repository type, but i still cant run the package.

here's the package.json file:

{
  "name": "password-generator",
  "version": "1.0.0",
  "private": true,
  "description": "A password generator",
  "main": "index.js",
  "preferGlobal": true,
  "bin": {
    "password-generator": "./index.js"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Valery",
  "license": "MIT",
  "dependencies": {
    "chalk": "^4.1.1",
    "clipboardy": "^2.3.0",
    "commander": "^8.1.0"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/valeryfun/password-generator-lazy.git"
  }
}

did i miss out anything such that I couldn't use the package after linking it?

Valery Fun
  • 194
  • 10
  • check this documentation: https://docs.npmjs.com/cli/v7/commands/npm-link . LOok at the example how it shows. have you tried like that same way ? –  Aug 02 '21 at 10:58
  • hi! yes i did follow the examples. @DivyanshuSah – Valery Fun Aug 03 '21 at 07:30

0 Answers0