there, I currently want to use npm install vue and axios. My computer was behind proxy, I also set the proxy. but still can't work.
Here is the work i have done:
npm install axios
and then i get this kind of error
[yliu#rhlab1 ~]$ npm install axios
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/axios failed, reason: write EPROTO 139889298220864:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /home/yliu/.npm/_logs/2020-03-16T18_27_02_693Z-debug.log
and the log it show like this :
[yliu#rhlab1 ~]$ cat /home/yliu/.npm/_logs/2020-03-16T18_27_02_693Z-debug.log | nl | tail -n 10
24 12 verbose stack at WriteWrap.afterWrite [as oncomplete] (net.js:790:10)
25 13 verbose cwd /home/yliu
26 14 verbose Linux 4.18.0-80.1.2.el8_0.x86_64
27 15 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "axios"
28 16 verbose node v10.14.1
29 17 verbose npm v6.4.1
30 18 error code EPROTO
31 19 error errno EPROTO
32 20 error request to http://registry.npmjs.org/axios failed, reason: write EPROTO 139889298220864:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:
33 21 verbose exit [ 1, true ]
set the proxy (for privacy didn't put my real proxy server):
npm config set http-proxy http://proxy.example.com:8080
npm config set https-proxy https://proxy.example.com:8080
and show it
[yliu#rhlab1 ~]$ npm config list
; cli configs
metrics-registry = "http://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.4.1 node/v10.14.1 linux x64"
; userconfig /home/yliu/.npmrc
http-proxy = "http://proxy.example.com:8080"
https-proxy = "https://proxy.example.com:8080/"
registry = "http://registry.npmjs.org/"
; node bin location = /usr/bin/node
; cwd = /home/yliu
; HOME = /home/yliu
; "npm config ls -l" to show all defaults.
I appropriate if anyone can give me some advices.
Thanks in advance!
Related
After my machine updated automatically, NPM is not working any more
OS: Ubuntu 20.04.3 LTS
npm -v: 8.1.4
node -v: v10.19.0
Every time I try to start something with NPM, it gives me the same error message:
*#*:~$ npm help
npm WARN npm npm does not support Node.js v10.19.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! Unexpected token =
npm ERR! A complete log of this run can be found in:
npm ERR! /home/*/.npm/_logs/2021-11-19T13_44_25_087Z-debug.log
The Error log contains the following:
0 verbose stack /usr/local/lib/node_modules/npm/lib/commands/help.js:16
30 verbose stack static description = 'Get help on npm'
30 verbose stack ^
30 verbose stack
30 verbose stack SyntaxError: Unexpected token =
30 verbose stack at Module._compile (internal/modules/cjs/loader.js:723:23)
30 verbose stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
30 verbose stack at Module.load (internal/modules/cjs/loader.js:653:32)
30 verbose stack at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
30 verbose stack at Function.Module._load (internal/modules/cjs/loader.js:585:3)
30 verbose stack at Module.require (internal/modules/cjs/loader.js:692:17)
30 verbose stack at require (internal/modules/cjs/helpers.js:25:18)
30 verbose stack at Npm.cmd (/usr/local/lib/node_modules/npm/lib/npm.js:97:18)
31 verbose cwd /home/*
32 verbose Linux 5.11.0-40-generic
33 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "help"
34 verbose node v10.19.0
35 verbose npm v8.1.4
36 error Unexpected token =
37 verbose exit 1
I solved it like this:
Install nvm
sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install node
Source
Upgrade your node version, you're using the newest npm version, and it doesn't support old versions of node
Since you're on ubuntu i recommend you to use nvm
sudo apt-get install nvm
nvm install 16
nvm use 16
npm is broken because it will ignore PATH, and it will ignore the calling runtime, instead it will use an arbitrary runtime.
sudo which node
/usr/local/bin/node
.
sudo /usr/local/bin/node --version
v17.1.0
.
sudo /usr/local/bin/node /usr/local/bin/npm install -g node#latest
...
npm ERR! npm WARN npm npm does not support Node.js v10.19.0
...
removing the distribution version might be a workaround.
I have problem using npx create-react-app command
Earlier I had create-react-app installed globally on and system and used npm create-react-app command
But I learned that using npx we will always use the latest version and to use npx I have uninstalled create-react-app from my system
Whenever I try to run npx create-react-app my-app command
I get the following error:
C:\Users\Sachin Verma\Desktop\react-project>npx create-react-app tut
Error: EPERM: operation not permitted, mkdir 'C:\Users\Sachin'
command not found: create-react-app
But if I install create-react-app on my system globally, then npx command works
I tried cleaning npm cache and also reinstalled node.js but the problem still exists
Edit:
When running CMD in administrator rights
Microsoft Windows [Version 10.0.19042.685]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>cd C:\Users\Sachin Verma\Desktop\react-project\
C:\Users\Sachin Verma\Desktop\react-project>npx create-react-app tutt
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Verma\AppData\Roaming\npm-cache\_npx\14832" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sachin Verma\AppData\Roaming\npm-cache\_logs\2021-01-11T15_27_28_701Z-debug.log
Install for [ 'create-react-app#latest' ] failed with code 1
Content of log file:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Sachin Verma\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'create-react-app#latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli 'C:\\Users\\Sachin',
1 verbose cli 'Verma\\AppData\\Roaming\\npm-cache\\_npx\\14832',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm#6.14.11
3 info using node#v15.5.1
4 verbose npm-session 5f8e13bb496752c5
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file:Verma\AppData\Roaming\npm-cache\_npx\14832 Could not install from "Verma\AppData\Roaming\npm-cache\_npx\14832" as it does not contain a package.json file.
8 http fetch GET 304 https://registry.npmjs.org/create-react-app 2907ms (from cache)
9 silly pacote tag manifest for create-react-app#latest fetched in 2943ms
10 timing stage:rollbackFailedOptional Completed in 2ms
11 timing stage:runTopLevelLifecycles Completed in 2957ms
12 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\Sachin Verma\Desktop\react-project\Verma\AppData\Roaming\npm-cache\_npx\14832\package.json'
13 verbose cwd C:\Users\Sachin Verma\Desktop\react-project
14 verbose Windows_NT 10.0.19042
15 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sachin Verma\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "create-react-app#latest" "--global" "--prefix" "C:\\Users\\Sachin" "Verma\\AppData\\Roaming\\npm-cache\\_npx\\14832" "--loglevel" "error" "--json"
16 verbose node v15.5.1
17 verbose npm v6.14.11
18 error code ENOLOCAL
19 error Could not install from "Verma\AppData\Roaming\npm-cache\_npx\14832" as it does not contain a package.json file.
20 verbose exit [ 1, true ]
Is there any problem due to my username because it contains a space in between?
Try to run your CMD in administration or you can change your working dir, where no admin privilege is required.
I have followed the link to configure cypress test to Azure pipeline.
https://medium.com/#schathurangajayasinghe/ci-with-azure-in-cypress-af2bbb7a46c4
After installation of npm. I am unable to run cypress command defined in package.json.
Adding content from my package.json
"devDependencies": {
"cypress": "^4.6.0",
"cypress-multi-reporters": "^1.2.4",
"mocha-junit-reporter": "^1.23.3"
},
"scripts": {
"scripts": "./node_modules/.bin/cypress run",
"test": "npm run scripts",
"test1": "echo \"Error: no test specified\" && exit 1"
},
This is my cypress.json code:
"reporter": "mocha-junit-reporter",
"reporterOptions": {
"mochaFile": "cypress/reports/junit/test-results.[hash].xml",
"testsuitesTitle": false
}
Adding YML details
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool#0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: |
sudo npm install
displayName: 'npm install'
- task: Npm#1
inputs:
command: 'custom'
customCommand: 'run test'
continueOnError: true
- task: PublishTestResults#2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/cypress/reports/junit'
mergeTestResults: true
testRunTitle: 'Publish Test Results'
Below is the complete error details from pipeline job run
I am not able to find any solution for error
2020-05-26T04:34:15.9216045Z ##[section]Starting: Npm
2020-05-26T04:34:15.9225064Z ==============================================================================
2020-05-26T04:34:15.9225380Z Task : npm
2020-05-26T04:34:15.9225735Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
2020-05-26T04:34:15.9226103Z Version : 1.169.1
2020-05-26T04:34:15.9226316Z Author : Microsoft Corporation
2020-05-26T04:34:15.9226618Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/package/npm
2020-05-26T04:34:15.9226975Z ==============================================================================
2020-05-26T04:34:16.2629701Z SYSTEMVSSCONNECTION exists true
2020-05-26T04:34:16.9531740Z SYSTEMVSSCONNECTION exists true
2020-05-26T04:34:16.9545193Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm --version
2020-05-26T04:34:17.2314792Z 6.14.4
2020-05-26T04:34:17.6413569Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm config list
2020-05-26T04:34:17.8370814Z ; cli configs
2020-05-26T04:34:17.8371879Z metrics-registry = `enter code here`"https://registry.npmjs.org/"
2020-05-26T04:34:17.8372133Z scope = ""
2020-05-26T04:34:17.8372525Z user-agent = "npm/6.14.4 node/v12.16.3 linux x64"
2020-05-26T04:34:17.8372690Z
2020-05-26T04:34:17.8372821Z ; environment configs
2020-05-26T04:34:17.8373011Z userconfig = "/home/vsts/work/1/npm/41.npmrc"
2020-05-26T04:34:17.8373157Z
2020-05-26T04:34:17.8373370Z ; node bin location = /opt/hostedtoolcache/node/12.16.3/x64/bin/node
2020-05-26T04:34:17.8373651Z ; cwd = /home/vsts/work/1/s
2020-05-26T04:34:17.8373816Z ; HOME = /home/vsts
2020-05-26T04:34:17.8374186Z ; "npm config ls -l" to show all defaults.
2020-05-26T04:34:17.8374338Z
2020-05-26T04:34:17.8385945Z [command]/opt/hostedtoolcache/node/12.16.3/x64/bin/npm run test
2020-05-26T04:34:18.3150165Z
2020-05-26T04:34:18.3150845Z > cypresspipe#1.0.0 test /home/vsts/work/1/s
2020-05-26T04:34:18.3151403Z > npm run scripts
2020-05-26T04:34:18.3151620Z
2020-05-26T04:34:18.3151833Z
2020-05-26T04:34:18.3152121Z > cypresspipe#1.0.0 scripts /home/vsts/work/1/s
**2020-05-26T04:34:18.3152416Z > cypress run** this command is coming from package.json
2020-05-26T04:34:18.3152610Z
**2020-05-26T04:34:18.3204244Z sh: 1: cypress: Permission denied**
2020-05-26T04:34:18.3811970Z npm ERR! code ELIFECYCLE
2020-05-26T04:34:18.3812168Z npm ERR! errno 126
2020-05-26T04:34:18.3812371Z npm ERR! cypresspipe#1.0.0 scripts: `cypress run`
2020-05-26T04:34:18.3812992Z npm ERR! Exit status 126
2020-05-26T04:34:18.3813124Z npm ERR!
2020-05-26T04:34:18.3813477Z npm ERR! Failed at the cypresspipe#1.0.0 scripts script.
2020-05-26T04:34:18.3813789Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3814045Z
2020-05-26T04:34:18.3814228Z npm ERR! A complete log of this run can be found in:
2020-05-26T04:34:18.3814731Z npm ERR! /home/vsts/.npm/_logs/2020-05-26T04_34_18_291Z-debug.log
2020-05-26T04:34:18.3814975Z npm ERR! code ELIFECYCLE
2020-05-26T04:34:18.3815122Z npm ERR! errno 126
2020-05-26T04:34:18.3815542Z npm ERR! cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3816150Z npm ERR! Exit status 126
2020-05-26T04:34:18.3816287Z npm ERR!
2020-05-26T04:34:18.3816460Z npm ERR! Failed at the cypresspipe#1.0.0 test script.
2020-05-26T04:34:18.3816746Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3816968Z
2020-05-26T04:34:18.3817147Z npm ERR! A complete log of this run can be found in:
2020-05-26T04:34:18.3817633Z npm ERR! /home/vsts/.npm/_logs/2020-05-26T04_34_18_306Z-debug.log
2020-05-26T04:34:18.3820304Z Found npm debug log, make sure the path matches with the one in npm's output: /home/vsts/.npm/_logs/2020-05-26T04_34_18_306Z-debug.log
2020-05-26T04:34:18.3820654Z 0 info it worked if it ends with ok
2020-05-26T04:34:18.3820827Z 1 verbose cli [
2020-05-26T04:34:18.3821175Z 1 verbose cli '/opt/hostedtoolcache/node/12.16.3/x64/bin/node',
2020-05-26T04:34:18.3821583Z 1 verbose cli '/opt/hostedtoolcache/node/12.16.3/x64/bin/npm',
2020-05-26T04:34:18.3822132Z 1 verbose cli 'run',
2020-05-26T04:34:18.3822409Z 1 verbose cli 'test'
2020-05-26T04:34:18.3822552Z 1 verbose cli ]
2020-05-26T04:34:18.3822689Z 2 info using npm#6.14.4
2020-05-26T04:34:18.3822857Z 3 info using node#v12.16.3
2020-05-26T04:34:18.3823190Z 4 verbose run-script [ 'pretest', 'test', 'posttest' ]
2020-05-26T04:34:18.3823447Z 5 info lifecycle cypresspipe#1.0.0~pretest: cypresspipe#1.0.0
2020-05-26T04:34:18.3823738Z 6 info lifecycle cypresspipe#1.0.0~test: cypresspipe#1.0.0
2020-05-26T04:34:18.3824434Z 7 verbose lifecycle cypresspipe#1.0.0~test: unsafe-perm in lifecycle true
2020-05-26T04:34:18.3826130Z 8 verbose lifecycle cypresspipe#1.0.0~test: PATH: /opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/vsts/work/1/s/node_modules/.bin:/opt/hostedtoolcache/node/12.16.3/x64/bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin
2020-05-26T04:34:18.3827060Z 9 verbose lifecycle cypresspipe#1.0.0~test: CWD: /home/vsts/work/1/s
2020-05-26T04:34:18.3827551Z 10 silly lifecycle cypresspipe#1.0.0~test: Args: [ '-c', 'npm run scripts' ]
2020-05-26T04:34:18.3827919Z 11 silly lifecycle cypresspipe#1.0.0~test: Returned: code: 126 signal: null
2020-05-26T04:34:18.3828247Z 12 info lifecycle cypresspipe#1.0.0~test: Failed to exec test script
2020-05-26T04:34:18.3828552Z 13 verbose stack Error: cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3828807Z 13 verbose stack Exit status 126
2020-05-26T04:34:18.3829373Z 13 verbose stack at EventEmitter.<anonymous> (/opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
2020-05-26T04:34:18.3829960Z 13 verbose stack at EventEmitter.emit (events.js:310:20)
2020-05-26T04:34:18.3830814Z 13 verbose stack at ChildProcess.<anonymous> (/opt/hostedtoolcache/node/12.16.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2020-05-26T04:34:18.3831256Z 13 verbose stack at ChildProcess.emit (events.js:310:20)
2020-05-26T04:34:18.3831746Z 13 verbose stack at maybeClose (internal/child_process.js:1021:16)
2020-05-26T04:34:18.3832122Z 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2020-05-26T04:34:18.3832414Z 14 verbose pkgid cypresspipe#1.0.0
2020-05-26T04:34:18.3832613Z 15 verbose cwd /home/vsts/work/1/s
2020-05-26T04:34:18.3833308Z 16 verbose Linux 5.3.0-1020-azure
2020-05-26T04:34:18.3833804Z 17 verbose argv "/opt/hostedtoolcache/node/12.16.3/x64/bin/node" "/opt/hostedtoolcache/node/12.16.3/x64/bin/npm" "run" "test"
2020-05-26T04:34:18.3834301Z 18 verbose node v12.16.3
2020-05-26T04:34:18.3834673Z 19 verbose npm v6.14.4
2020-05-26T04:34:18.3835103Z 20 error code ELIFECYCLE
2020-05-26T04:34:18.3835252Z 21 error errno 126
2020-05-26T04:34:18.3835458Z 22 error cypresspipe#1.0.0 test: `npm run scripts`
2020-05-26T04:34:18.3835783Z 22 error Exit status 126
2020-05-26T04:34:18.3835980Z 23 error Failed at the cypresspipe#1.0.0 test script.
2020-05-26T04:34:18.3836277Z 23 error This is probably not a problem with npm. There is likely additional logging output above.
2020-05-26T04:34:18.3836562Z 24 verbose exit [ 126, true ]
2020-05-26T04:34:18.3836682Z
2020-05-26T04:34:18.3870900Z ##[error]Error: Npm failed with return code: 126
2020-05-26T04:34:18.3885472Z ##[section]Finishing: Npm
I git clone a Node app.
Then I try to install all the dependencies with npm install.
I get the following error.
npm ERR! code EIO
npm ERR! syscall read
npm ERR! errno -5
npm ERR! EIO: i/o error, read
npm ERR! A complete log of this run can be found in:
npm ERR! /home/foobar/.npm/_logs/2020-02-22T12_14_17_084Z-debug.log
The last lines of the log file look like this:
...
...
3830 silly saveTree └── typescript#3.8.2
3831 verbose stack Error: EIO: i/o error, read
3832 verbose cwd /home/foobar/myapp
3833 verbose Linux 5.4.18-1-MANJARO
3834 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
3835 verbose node v13.7.0
3836 verbose npm v6.13.6
3837 error code EIO
3838 error syscall read
3839 error errno -5
3840 error EIO: i/o error, read
3841 verbose exit [ -5, true ]
When I prepend the command with sudo it installs.
How can I fix this error so I don't need to run npm install with sudo?
I fixed it by deleting my ~/.npm and other node related directories in $HOME.
We're using Nexus 3.0.1-01 to proxy https://registry.npmjs.org/
We've configured a group containing the proxy to npmjs.org and our locally hosted npm repo. In the local npm-config we have pointed npm to our Nexus as registry.
All connections to the internet pass our corporate http(s) proxy.
When resolving "public" dependencies like bower (e.g. via npm install -g bower) with Nexus it will fail 8 out of 10 times. When we point to the official registry everything works fine 100% of the time.
The error looks like this:
$ npm install -g bower
npm ERR! Linux 3.13.0-107-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! node v4.3.2
npm ERR! npm v2.14.12
npm ERR! Cannot convert undefined or null to object
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! npm-debug.log
Looking at the debug log, we get a HTTP 404 and then a HTTP 304 and then the install fails.
2 info using npm#2.14.12
3 info using node#v4.3.2
[...]
21 http request GET http://nexus/repository/npm/bower
22 http 404 http://nexus/repository/npm/bower
23 verbose headers { date: 'Thu, 02 Feb 2017 08:32:35 GMT',
23 verbose headers server: 'Nexus/3.0.1-01 (OSS)',
23 verbose headers 'x-frame-options': 'SAMEORIGIN',
23 verbose headers 'x-content-type-options': 'nosniff',
23 verbose headers 'content-type': 'application/json',
23 verbose headers 'content-length': '37',
23 verbose headers 'x-cache': 'MISS from proxy',
23 verbose headers 'x-cache-lookup': 'HIT from proxy:3128',
23 verbose headers connection: 'keep-alive' }
24 silly get cb [ 304, undefined ]
25 verbose get saving undefined to /user/.npm/nexus/repository/npm/bower/.cache.json
26 silly addNameTag next cb for bower with tag latest
27 verbose stack TypeError: Cannot convert undefined or null to object
27 verbose stack at Function.keys (native)
27 verbose stack at installTargetsError (/usr/lib/node_modules/npm/lib/cache/add-named.js:273:24)
27 verbose stack at next (/usr/lib/node_modules/npm/lib/cache/add-named.js:94:10)
27 verbose stack at RES (/usr/lib/node_modules/npm/node_modules/inflight/inflight.js:23:14)
27 verbose stack at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
27 verbose stack at fixName (/usr/lib/node_modules/npm/lib/cache/add-named.js:29:5)
27 verbose stack at saved (/usr/lib/node_modules/npm/lib/cache/caching-client.js:173:7)
27 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7
27 verbose stack at FSReqWrap.oncomplete (fs.js:82:15)
Like I said, we can repeat the install a few times and eventually it will work. If we use https://registry.npmjs.org/ trough our proxy everything works fine.
We also have a Nexus 2.11.3-01 that also works just fine if we use this as npm registry (proxy).
I have searched the Sonatype JIRA but couldn't find any hints to whether this is a Nexus 3 issue or not.
Any hints are appreciated!
OK, together with IT I was able to solve this.
Turns out it was a weird bug in Squid. After some changes in the caching configuration resolving now works as expected.
Thanks everyone involved for contributing!