Home > Software design >  Trying to install npm
Trying to install npm

Time:11-12

I am trying to install npm and failing. Firstly have downloaded the latest package from https://nodejs.org/en/download/ and installed that. When attempting an 'npm install' I get this in the console window:

npm install
npm ERR! code E404
npm ERR! 404 Not Found - GET https://skimdb.npmjs.com/registry/db-migrate/db-migrate
npm ERR! 404
npm ERR! 404 'db-migrate@^0.11.11' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
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! C:\Users\ukrcsskumar7\AppData\Local\npm-cache\_logs\2021-11-11T16_33_55_070Z-debug.log

Here is the contents of the mentioned log file:

0 verbose cli [
0 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli 'login'
0 verbose cli ]
1 info using npm@8.1.0
2 info using node@v16.13.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\Users\ukrcsskumar7\source\repos\digitalblueprint-database\.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\ukrcsskumar7\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\ukrcsskumar7\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 2ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 19ms
19 timing npm:load:configload Completed in 19ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 1ms
22 timing config:load:flatten Completed in 4ms
23 timing npm:load:cleanupLog Completed in 3ms
24 timing npm:load:configScope Completed in 0ms
25 timing npm:load:projectScope Completed in 4ms
26 timing npm:load Completed in 32ms
27 notice Log in on https://skimdb.npmjs.com/registry/db-migrate
28 verbose web login before first POST
29 verbose web login not supported, trying couch
30 warn Email must be an email address
31 warn Email must be an email address
32 verbose login before first PUT {
32 verbose login _id: 'org.couchdb.user:ukrcsskumar7',
32 verbose login name: 'ukrcsskumar7',
32 verbose login password: 'XXXXX',
32 verbose login type: 'user',
32 verbose login roles: [],
32 verbose login date: '2021-11-11T16:15:27.009Z'
32 verbose login }
33 verbose adduser before first PUT {
33 verbose adduser _id: 'org.couchdb.user:ukrcsskumar7',
33 verbose adduser name: 'ukrcsskumar7',
33 verbose adduser password: 'XXXXX',
33 verbose adduser email: '\x1B[F\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[B\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[C\x1B[[email protected]',
33 verbose adduser type: 'user',
33 verbose adduser roles: [],
33 verbose adduser date: '2021-11-11T16:15:27.048Z'
33 verbose adduser }
34 timing command:adduser Completed in 189335ms
35 verbose stack HttpErrorGeneral: 404 Not Found - PUT https://skimdb.npmjs.com/registry/db-migrate/-/user/org.couchdb.user:ukrcsskumar7
35 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:95:15
35 verbose stack at processTicksAndRejections (node:internal/process/task_queues:96:5)
35 verbose stack at async addNewUser (C:\Program Files\nodejs\node_modules\npm\lib\auth\legacy.js:36:17)
35 verbose stack at async login (C:\Program Files\nodejs\node_modules\npm\lib\auth\legacy.js:67:13)
35 verbose stack at async AddUser.adduser (C:\Program Files\nodejs\node_modules\npm\lib\adduser.js:41:35)
36 verbose statusCode 404
37 verbose pkgid org.couchdb.user:ukrcsskumar7
38 verbose cwd C:\Users\ukrcsskumar7\source\repos\digitalblueprint-database
39 verbose Windows_NT 10.0.19041
40 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "login"
41 verbose node v16.13.0
42 verbose npm v8.1.0
43 error code E404
44 error 404 Not Found - PUT https://skimdb.npmjs.com/registry/db-migrate/-/user/org.couchdb.user:ukrcsskumar7
45 error 404
46 error 404 'org.couchdb.user:ukrcsskumar7' is not in this registry.
47 error 404 This package name is not valid, because
48 error 404 1. name can only contain URL-friendly characters
49 error 404 Note that you can also install from a
50 error 404 tarball, folder, http url, or git url.
51 verbose exit 1

If anyone could help I'd be eternally grateful :) Thanks

UPDATE: Here is the package.json

    {
      "name": "enhance-database",
      "version": "1.0.0",
      "description": "Database schema migrations for Enhance",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      

},
  "repository": {
    "type": "git",
    "url": "ssh://[email protected]:7999/enh/enhance-database.git"
  },
  "devDependencies": {
    "db-migrate": "^0.11.11",
    "db-migrate-mssql-ssis": "https://github.com/andyjones/db-migrate-mssql-ssis.git"
  }
}

CodePudding user response:

It's because when you run npm install, what npm is actually doing is installing all of the dependencies listed in your package.json. To install npm, you need to run npm install npm@version.

CodePudding user response:

Your issue resolved here.

Briefly: Create new project with npx create-react-app project-name. Last created a project successfully last week using the same PC

For details, check the link.

  • Related