How to solve the problem of npm link error?

 npm link
npm WARN app@1.0.0 No repository field.

up to date in 0.724s
npm ERR! path C:\Users\Cooper\AppData\Roaming\npm\node_modules\app\app
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod "C:\Users\Cooper\AppData\Roaming\npm\node_modules\app\app"
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Cooper\AppData\Roaming\npm-cache\_logs\2018-04-06T17_15_16_211Z-debug.log

the package.json file is as follows:

{
  "name": "app",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "bin": {
    "app": "app"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "cooper",
  "license": "ISC",
  "devDependencies": {
    "chalk": "^2.3.2",
    "commander": "^2.15.1",
    "inquirer": "^5.2.0"
  }
}
Mar.01,2021

look at the contents of your package.json file


the actual code of the landlord should be written in app.js. Change "app": "app" in bin in package.json to "app": "app.js" should be fine


.
"bin": {
    "app": "app"
}

to assign to the file, add the suffix "app": "app.js"

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e974af-47419.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e974af-47419.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?