Npm cannot install packages

I need help because I cannot install npm packages. When I try to install something, I get this error.

enter image description here

My node version is 6.11.0, and the npm version is 3.10.10.

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'server:dev',
1 verbose cli   '--',
1 verbose cli   '--hot',
1 verbose cli   '--proxy-requests' ]
2 info using npm@3.10.10
3 info using node@v6.11.0
4 verbose stack Error: missing script: server:dev
4 verbose stack     at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:151:19)
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:61:5
4 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:356:5
4 verbose stack     at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:320:45)
4 verbose stack     at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:354:3)
4 verbose stack     at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:124:5)
4 verbose stack     at ReadFileContext.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:295:20)
4 verbose stack     at ReadFileContext.callback (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:366:13)
5 verbose cwd C:\Users\Scyli\Desktop\angular
6 error Windows_NT 10.0.14393
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "server:dev" "--" "--hot" "--proxy-requests"
8 error node v6.11.0
9 error npm  v3.10.10
10 error missing script: server:dev
11 error If you need help, you may report this error at:
11 error     <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]

Please help me solve this problem.

+5
source share
6 answers

Solved: 32-bit NodeJs completely solved my problem.

+4
source

These teams solve the same problem.

npm install -g npm
npm cache clean
npm update
npm install
+2
source

npm-config

npm config edit

npm

;;;;
; npm userconfig file
; this is a simple ini-formatted file
; lines that start with semi-colons are comments.
; read 'npm help config' for help on the various options
;;;;


;;;;
; all options with default values
;;;;
; access=null

; allow-same-version=false

; always-auth=false

; also=null

; auth-type=legacy

; bin-links=true

; browser=null

; ca=null

; cafile=undefined

; cache=C:\Users\Admin\AppData\Roaming\npm-cache

; cache-lock-stale=60000

; cache-lock-retries=10

; cache-lock-wait=10000

; cache-max=null

; cache-min=10

; cert=null

; cidr=null

; color=true

; depth=null

; description=true

; dev=false

; dry-run=false

; editor=notepad.exe

; engine-strict=false

; force=false

; fetch-retries=2

; fetch-retry-factor=10

; fetch-retry-mintimeout=10000

; fetch-retry-maxtimeout=60000

; git=git

; git-tag-version=true

; commit-hooks=true

; global=false

; globalconfig=C:\Users\Admin\AppData\Roaming\npm\etc\npmrc

; global-style=false

; group=0

; ham-it-up=false

; heading=npm

; if-present=false

; ignore-prepublish=false

; ignore-scripts=false

; init-module=C:\Users\Admin\.npm-init.js

; init-author-name=

; init-author-email=

; init-author-url=

; init-version=1.0.0

; init-license=ISC

; json=false

; key=null

; legacy-bundling=false

; link=false

; local-address=undefined

; loglevel=notice

; logs-max=10

; long=false

; maxsockets=50

; message=%s

; metrics-registry=null

; node-options=null

; node-version=8.11.2

; offline=false

; onload-script=null

; only=null

; optional=true

; otp=0

; package-lock=true

; package-lock-only=false

; parseable=false

; prefer-offline=false

; prefer-online=false

; prefix=C:\Program Files\nodejs

; production=false

; progress=true

; proxy=null

; https-proxy=null

; user-agent=npm/{npm-version} node/{node-version} {platform} {arch}

; read-only=false

; rebuild-bundle=true

; registry=https://registry.npmjs.org/

; rollback=true

; save=true

; save-bundle=false

; save-dev=false

; save-exact=false

; save-optional=false

; save-prefix=^

; save-prod=false

; scope=

; script-shell=null

; scripts-prepend-node-path=warn-only

; searchopts=

; searchexclude=null

; searchlimit=20

; searchstaleness=900

; send-metrics=false

; shell=C:\Windows\system32\cmd.exe

; shrinkwrap=true

; sign-git-tag=false

; sso-poll-frequency=500

; sso-type=oauth

; strict-ssl=true

; tag=latest

; tag-version-prefix=v

; timing=false

; tmp=C:\Users\Admin\AppData\Local\Temp

; unicode=false

; unsafe-perm=true

; usage=false

; user=0

; userconfig=C:\Users\Admin\.npmrc

; umask=0

; version=false

; versions=false

; viewer=browser

; _exit=true

; globalignorefile=C:\Users\Admin\AppData\Roaming\npm\etc\npmignore
+1

, npm nodejs.

C:\Program Files\nodejs\npm :

npm cache clean

npm

npm update

, !

0

I get the Err signature sheet, so I solved it with: // first enter this

npm config set strict-ssl false

//and then

npm config set NODE_TLS_REJECT_UNAUTHORIZED 0

and after that try installing the packages.

0
source

I tried many different suggestions to find a solution. For reference: I work in an online Goorm environment.

In the end, just reinstalling npm in the root directory did the trick. I ran:

sudo npm install npm -g

and after that I was able to install the packages again as usual.

0
source

Source: https://habr.com/ru/post/1678940/


All Articles