NPM can't install webpack - npm

D:\Programming\React\Project1>npm install --save-dev webpack
npm ERR! Maximum call stack size exceeded
This is the error i get when trying to install webpack. I had node version 10.50 now i am with node 11.10.0 and npm 6.7.0
I did cache clean --force , that didn't help. I installed react, react-dom babel but the webpack gives this error. I tryed installing it with --save-dev and without it, the result was the same. the log file is
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\Program Files\\Node\\node.exe',
1 verbose cli 'D:\\Program Files\\Node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '--save-dev',
1 verbose cli 'webpack' ]
2 info using npm#6.7.0
3 info using node#v11.10.0
4 verbose npm-session 85b41b11615ec8a8
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/webpack 377ms
8 silly pacote tag manifest for webpack#latest fetched in 413ms
9 timing stage:loadCurrentTree Completed in 804ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 3ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 179ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule webpack#4.29.4 checking installable status
17 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fast 80ms
18 silly pacote version manifest for #webassemblyjs/ast#1.8.2 fetched in 88ms
19 silly resolveWithNewModule #webassemblyjs/ast#1.8.2 checking installable status
20 http fetch GET 200 https://registry.npmjs.org/ajv-keywords 148ms
21 http fetch GET 200 https://registry.npmjs.org/chrome-trace-event 149ms
22 http fetch GET 200 https://registry.npmjs.org/acorn-dynamic-import 158ms
23 http fetch GET 200 https://registry.npmjs.org/acorn 165ms
24 http fetch GET 200 https://registry.npmjs.org/enhanced-resolve 162ms
25 http fetch GET 200 https://registry.npmjs.org/eslint-scope 98ms
26 silly pacote range manifest for chrome-trace-event#^1.0.0 fetched in 177ms
27 silly resolveWithNewModule chrome-trace-event#1.0.0 checking installable status
28 silly pacote range manifest for ajv-keywords#^3.1.0 fetched in 184ms
29 silly resolveWithNewModule ajv-keywords#3.4.0 checking installable status
30 silly pacote range manifest for enhanced-resolve#^4.1.0 fetched in 193ms
31 silly resolveWithNewModule enhanced-resolve#4.1.0 checking installable status
32 silly pacote range manifest for acorn-dynamic-import#^4.0.0 fetched in 206ms
33 silly resolveWithNewModule acorn-dynamic-import#4.0.0 checking installable status
34 silly pacote range manifest for acorn#^6.0.5 fetched in 209ms
35 silly resolveWithNewModule acorn#6.1.0 checking installable status
36 silly pacote range manifest for eslint-scope#^4.0.0 fetched in 135ms
37 silly resolveWithNewModule eslint-scope#4.0.0 checking installable status
38 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fwasm-edit 236ms
39 http fetch GET 200 https://registry.npmjs.org/ajv 229ms
40 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fhelper-module-context 245ms
41 http fetch GET 200 https://registry.npmjs.org/json-parse-better-errors 57ms
42 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fwasm-parser 249ms
43 http fetch GET 200 https://registry.npmjs.org/loader-runner 68ms
44 silly pacote version manifest for #webassemblyjs/wasm-edit#1.8.2 fetched in 279ms
45 silly resolveWithNewModule #webassemblyjs/wasm-edit#1.8.2 checking installable status
46 silly pacote range manifest for ajv#^6.1.0 fetched in 273ms
47 silly resolveWithNewModule ajv#6.9.1 checking installable status
48 http fetch GET 200 https://registry.npmjs.org/memory-fs 74ms
49 http fetch GET 200 https://registry.npmjs.org/micromatch 71ms
50 silly pacote version manifest for #webassemblyjs/helper-module-context#1.8.2 fetched in 289ms
51 silly resolveWithNewModule #webassemblyjs/helper-module-context#1.8.2 checking installable status
52 silly pacote version manifest for #webassemblyjs/wasm-parser#1.8.2 fetched in 290ms
53 silly resolveWithNewModule #webassemblyjs/wasm-parser#1.8.2 checking installable status
54 silly pacote range manifest for json-parse-better-errors#^1.0.2 fetched in 106ms
55 silly resolveWithNewModule json-parse-better-errors#1.0.2 checking installable status
56 silly pacote range manifest for loader-runner#^2.3.0 fetched in 102ms
57 silly resolveWithNewModule loader-runner#2.4.0 checking installable status
58 http fetch GET 200 https://registry.npmjs.org/node-libs-browser 78ms
59 http fetch GET 200 https://registry.npmjs.org/neo-async 91ms
60 silly pacote range manifest for micromatch#^3.1.8 fetched in 96ms
61 silly resolveWithNewModule micromatch#3.1.10 checking installable status
62 silly pacote range manifest for memory-fs#~0.4.1 fetched in 100ms
63 silly resolveWithNewModule memory-fs#0.4.1 checking installable status
64 silly pacote range manifest for node-libs-browser#^2.0.0 fetched in 90ms
65 silly resolveWithNewModule node-libs-browser#2.2.0 checking installable status
66 silly pacote range manifest for neo-async#^2.5.0 fetched in 101ms
67 silly resolveWithNewModule neo-async#2.6.0 checking installable status
68 http fetch GET 200 https://registry.npmjs.org/tapable 43ms
69 http fetch GET 200 https://registry.npmjs.org/terser-webpack-plugin 52ms
70 http fetch GET 200 https://registry.npmjs.org/webpack-sources 44ms
71 http fetch GET 200 https://registry.npmjs.org/schema-utils 63ms
72 silly pacote range manifest for tapable#^1.1.0 fetched in 64ms
73 silly resolveWithNewModule tapable#1.1.1 checking installable status
74 http fetch GET 200 https://registry.npmjs.org/watchpack 56ms
75 silly pacote range manifest for terser-webpack-plugin#^1.1.0 fetched in 65ms
76 silly resolveWithNewModule terser-webpack-plugin#1.2.2 checking installable status
77 silly pacote range manifest for webpack-sources#^1.3.0 fetched in 57ms
78 silly resolveWithNewModule webpack-sources#1.3.0 checking installable status
79 silly pacote range manifest for schema-utils#^1.0.0 fetched in 75ms
80 silly resolveWithNewModule schema-utils#1.0.0 checking installable status
81 silly pacote range manifest for watchpack#^1.5.0 fetched in 64ms
82 silly resolveWithNewModule watchpack#1.6.0 checking installable status
83 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fwast-parser 48ms
84 silly pacote version manifest for #webassemblyjs/wast-parser#1.8.2 fetched in 57ms
85 silly resolveWithNewModule #webassemblyjs/wast-parser#1.8.2 checking installable status
86 http fetch GET 200 https://registry.npmjs.org/#webassemblyjs%2fhelper-wasm-bytecode 71ms
87 silly pacote version manifest for #webassemblyjs/helper-wasm-bytecode#1.8.2 fetched in 77ms
88 silly resolveWithNewModule #webassemblyjs/helper-wasm-bytecode#1.8.2 checking installable status
89 silly fetchPackageMetaData error for long#git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69 Error while executing:
89 silly fetchPackageMetaData undefined ls-remote -h -t git://github.com/dcodeIO/long.js.git
89 silly fetchPackageMetaData
89 silly fetchPackageMetaData
89 silly fetchPackageMetaData spawn git ENOENT
90 verbose stack RangeError: Maximum call stack size exceeded
90 verbose stack at RegExp.test (<anonymous>)
90 verbose stack at isDepOptional (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:405:45)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:414:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
90 verbose stack at failedDependency (D:\Program Files\Node\node_modules\npm\lib\install\deps.js:430:9)
91 verbose cwd D:\Programming\React\Project1
92 verbose Windows_NT 6.1.7601
93 verbose argv "D:\\Program Files\\Node\\node.exe" "D:\\Program Files\\Node\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "webpack"
94 verbose node v11.10.0
95 verbose npm v6.7.0
96 error Maximum call stack size exceeded
97 verbose exit [ 1, true ]
How can i fix that guys please give advice.

Installing the previous version worked for me:
npm install webpack#4.29.3 --save-dev

I ran into a similar issue today. Looking at your log file on line 89 it says 'undefined' instead of git executable path.
Check git --version from commandline.
If it's not on path or 2.19.* install latest git client (currently git version 2.20.1.windows.1) please tell if it works.
update : adding my log for reference of anyone having same issue. My problem was caused by this issue in git client. After updating the git client I can install the latest webpack without a problem.
329 silly resolveWithNewModule #webassemblyjs/floating-point-hex-parser#1.8.2 checking installable status
330 silly fetchPackageMetaData error for long#git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69 Error while executing:
330 silly fetchPackageMetaData C:\Program Files\Git\cmd\git.EXE ls-remote -h -t git://github.com/dcodeIO/long.js.git
330 silly fetchPackageMetaData
330 silly fetchPackageMetaData fatal: unable to look up github.com (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )
330 silly fetchPackageMetaData
330 silly fetchPackageMetaData exited with error code: 128
331 verbose stack RangeError: Maximum call stack size exceeded
331 verbose stack at RegExp.test (<anonymous>)
331 verbose stack at isDepOptional (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:405:45)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:414:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
331 verbose stack at failedDependency (C:\Users\kmhatre\AppData\Roaming\npm\node_modules\npm\lib\install\deps.js:430:9)
332 verbose cwd D:\exp\DjReact
333 verbose Windows_NT 10.0.14393
334 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kmhatre\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i" "webpack#latest"
335 verbose node v8.11.3
336 verbose npm v6.8.0
337 error Maximum call stack size exceeded
338 verbose exit [ 1, true ]

Related

How to debug and fix npm and yarn connection issues?

I am trying to create a new create-react-app project (yarn create react-app my-app and npm init react-app my-app and npx create-react-app my-app) but it fails with network / connection issues (logs shown below). I have tried a bunch of fixes but nothing works. What else can I try or how can I check if it really is a network issue (how to debug)?
What I've tried:
Successfully run other yarn and npm commands
yarn add axios and npm install axios
Checked .npmrc and it has registry=https://registry.npmjs.org/
Increased yarn's network timeout yarn install --network-timeout 1000000
Reinstalled create react app
npm uninstall -g create-react-app
&& npm install -g create-react-app -d
Checked the proxy settings yarn config get proxy // undefined yarn config get https-proxy // undefined
Made sure my version of npm (9.4.0) supports tls1.2 npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
If I run yarn create react-app my-app it logs
yarn create v1.22.19
[2/4] 🚚 Fetching packages...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz: aborted.
This is the output in the bug report
Trace:
Error: aborted
at connResetException (node:internal/errors:718:14)
at TLSSocket.socketCloseListener (node:_http_client:456:19)
at TLSSocket.emit (node:events:525:35)
at node:net:320:12
at TCP.done (node:_tls_wrap:588:7)
If I run npm init create-react-app my-app it logs the following to the console
npm ERR! code ECONNRESET
npm ERR! network aborted
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
This is the output in the bug report
…
385 notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
386 http fetch POST 426 http://registry.npmjs.org/-/npm/v1/security/audits/quick 150ms
387 verbose audit error HttpErrorGeneral: 426 Upgrade Required - POST
387 verbose audit error at async AuditReport.run (/Users/.nvm/versions/node/v18.13.0/lib/node_modules/npm/node_modules/#npmcli/arborist/lib/audit-report.js:106:19) {
387 verbose audit error headers: [Object: null prototype] {
387 verbose audit error date: [ 'Fri, 27 Jan 2023 00:52:26 GMT' ],
387 verbose audit error 'content-type': [ 'text/plain' ],
387 verbose audit error 'content-length': [ '271' ],
387 verbose audit error connection: [ 'keep-alive' ],
387 verbose audit error 'npm-notice': [
387 verbose audit error 'Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/'
387 verbose audit error ],
387 verbose audit error vary: [ 'Accept-Encoding' ],
387 verbose audit error server: [ 'cloudflare' ],
387 verbose audit error 'cf-ray': [ '78fd816fa9cc5ab4-MEL' ],
387 verbose audit error via: [ 'HTTP/1.1 m_proxy_mel1' ],
387 verbose audit error 'x-fetch-attempts': [ '1' ]
387 verbose audit error },
387 verbose audit error statusCode: 426,
387 verbose audit error code: 'E426',
387 verbose audit error method: 'POST',
387 verbose audit error uri: 'http://registry.npmjs.org/-/npm/v1/security/audits/quick',
387 verbose audit error body: <Buffer 42 65 67 69 6e 6e 69 6e 67 20 4f 63 74 6f 62 65 72 20 34 2c 20 32 30 32 31 2c 20 61 6c 6c 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 74 6f 20 6e 70 6d 20 ... 221 more bytes>,
387 verbose audit error pkgid: undefined
387 verbose audit error }
388 silly audit error Beginning October 4, 2021, all connections to npm websites and the npm registry - including for package installation - must use HTTPS and TLS 1.2 or higher.
388 silly audit error
388 silly audit error For more information see this blog post: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
389 timing auditReport:getReport Completed in 325ms
390 silly audit report null
391 timing reify:audit Completed in 325ms
392 verbose stack Error: aborted
392 verbose stack at connResetException (node:internal/errors:718:14)
392 verbose stack at TLSSocket.socketCloseListener (node:_http_client:456:19)
392 verbose stack at TLSSocket.emit (node:events:525:35)
392 verbose stack at node:net:320:12
392 verbose stack at TCP.done (node:_tls_wrap:588:7)
394 verbose Darwin 22.2.0
395 verbose node v18.13.0
396 verbose npm v9.4.0
397 error code ECONNRESET
398 error network aborted
399 error network This is a problem related to network connectivity.
399 error network In most cases you are behind a proxy or have bad network settings.
399 error network
399 error network If you are behind a proxy, please make sure that the
399 error network 'proxy' config is set properly. See: 'npm help config'
400 verbose exit 1
401 timing npm Completed in 43344ms
402 verbose unfinished npm timer command:init 1674780703163
403 verbose unfinished npm timer reify 1674780735103
404 verbose unfinished npm timer reify:unpack 1674780745902
405 verbose unfinished npm timer reifyNode:node_modules/tar 1674780745904
406 verbose unfinished npm timer reify:rollback:createSparse 1674780746457
407 verbose code 1
Node.js v18.13.0
npm --version 9.4.0
yarn 1.22.19

AWS-CDK returning maximum call stack size exceed when installing with npm

I'm getting an error when I run npm install -g aws-cdk it says Maximum call stack size exceeded if I don't do the global install then I don't get that error but my windows machine doesn't pick up that I have AWS-CDK installed then. The documentation also says to install globally.
Has anyone encountered this?
An important note I am using a company PC that sits behind a VPN. I can't however disconnect this from the VPN.
I'm running version 16.18.0 node and version 8.19.2 of npm
The log file where the error is:
37 verbose stack at resolve (node:path:158:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:21:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)
37 verbose stack at realpathCached (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\realpath.js:41:10)```
I had the same issue. My problem is that I work on a PC with roaming profiles where APPDATA is redirected to a server share. In my case changing the npm prefix directory solved the issue. Try the following:
npm config --global get prefix
In my case the output was: \\SRV02\Profiles\USERNAME_HERE\AppData\Roaming\npm
I changed it using the following command
npm config --global set prefix C:\tools\npm-prefix
then everything works. Remember to add C:\tools\npm-prefix to the PATH environment variable
This may be related to something in your global node_modules directory and not the AWS CDK. Try some answers to this question first.

Update to reactive 18.1.0

I try create a react-app with npx create-native init project but the react version was 17.0.2.
I used npm install react react-dom( following https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html) to update for the new version but now I received the message when I try create a nem project: npm ERR! could not determine executable to run.
What should I do?
log:
38 verbose stack Error: could not determine executable to run
38 verbose stack at getBinFromManifest (C:\Users\55319\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmexec\lib\get-bin-from-manifest.js:17:23)
38 verbose stack at exec (C:\Users\55319\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmexec\lib\index.js:135:15)
38 verbose stack at async module.exports (C:\Users\55319\AppData\Roaming\npm\node_modules\npm\lib\cli.js:78:5)
39 verbose pkgid create-native#1.0.0
40 verbose cwd C:\Users\55319
41 verbose Windows_NT 10.0.19044
42 verbose node v16.15.0
43 verbose npm v8.8.0
44 error could not determine executable to run
45 verbose exit 1
46 timing npm Completed in 2369ms
47 verbose code 1
48 error A complete log of this run can be found in:
48 error C:\Users\55319\AppData\Local\npm-cache_logs\2022-05-12T01_59_05_028Z-debug-0.log
CMD
It installed that version because that's the version it's compatible with, as of this writing (RN 68.1). React Native often doesn't use the latest version of React. If you open up the changelog for React Native and search for React 17, you'll see it was introduced into React Native version 64.0. There are no hits for React 18 because it hasn't yet been integrated.

Can't install material-ui/core for react-native 17.0.1

Would anyone be able to clarify as to why this is not installing as it should?
$ npm install #material-ui/core
Here are the logs:
...
29 http fetch GET 304 https://registry.npmjs.org/react 125ms (from cache)
30 timing idealTree Completed in 2086ms
31 timing command:install Completed in 2090ms
32 verbose stack Error: unable to resolve dependency tree
32 verbose stack at Arborist.[failPeerConflict] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:1011:25)
32 verbose stack at Arborist.[loadPeerSet] (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\build-ideal-tree.js:991:36)
36 verbose node v15.0.0
37 verbose npm v7.0.2
38 error code ERESOLVE
39 error ERESOLVE unable to resolve dependency tree
40 error
41 error While resolving: [1mamazon-clone[22m#[1m0.1.0[22m
41 error Found: [1mreact[22m#[1m17.0.1[22m[2m[22m
41 error [2mnode_modules/react[22m
41 error [1mreact[22m#"[1m^17.0.1[22m" from the root project
41 error
41 error Could not resolve dependency:
41 error [35mpeer[39m [1mreact[22m#"[1m^16.8.0[22m" from [1m#material-ui/core[22m#[1m4.11.0[22m[2m[22m
41 error [2mnode_modules/#material-ui/core[22m
41 error [1m#material-ui/core[22m#"[1m*[22m" from the root project
41 error
41 error Fix the upstream dependency conflict, or retry
41 error this command with --force, or --legacy-peer-deps
41 error to accept an incorrect (and potentially broken) dependency resolution.
I got chuncks of the logs above that may tell what exactly is going on.
Looks like this post has your solution:
https://github.com/npm/cli/issues/2000. It looks like a recent issue with an eslint dependency

npm publish wants to publish only to npm repository

I am using VSTS as NPM private repo but if I want to do npm publish always want's to publish not to my private repo but to the npm public repo.
I have installed
npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
Than i have done this:
vsts-npm-auth -config .npmrc
And my .npmrc file contains this
registry=https://myhost/_packaging/myfeed/npm/registry/
always-auth=true
I also used
"publishConfig": {
"registry": "https://myhost/_packaging/myfeed/npm/registry/"
},
To ovverride the registry but without success. It always want's to publish to the npm repo
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "publish"
npm ERR! node v7.7.3
npm ERR! npm v4.1.2
npm ERR! code ENEEDAUTH
npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
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 'publish' ]
2 info using npm#4.1.2
3 info using node#v7.7.3
4 verbose publish [ '.' ]
5 silly cache add args [ '.', null ]
6 verbose cache add spec .
7 silly cache add parsed spec Result {
7 silly cache add raw: '.',
7 silly cache add scope: null,
7 silly cache add escapedName: null,
7 silly cache add name: null,
7 silly cache add rawSpec: '.',
7 silly cache add spec: 'C:\\temp\\empty-list',
7 silly cache add type: 'directory' }
8 verbose addLocalDirectory C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package.tgz not in flight; packing
9 verbose correctMkdir C:\Users\cpi\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
10 warn prepublish-on-install As of npm#5, `prepublish` scripts will run only for `npm publish`.
11 warn prepublish-on-install (In npm#4 and previous versions, it also runs for `npm install`.)
12 warn prepublish-on-install See the deprecation note in `npm help scripts` for more information.
13 info lifecycle #systems/empty-list#1.0.0~prepublish: #systems/empty-list#1.0.0
14 verbose lifecycle #systems/empty-list#1.0.0~prepublish: unsafe-perm in lifecycle true
15 verbose lifecycle #systems/empty-list#1.0.0~prepublish: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\temp\empty-list\node_modules\.bin;C:\Program Files\ConEmu\ConEmu\Scripts;C:\Program Files\ConEmu;C:\Program Files\ConEmu\ConEmu;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files\nodejs\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Git\cmd;C:\Users\cpi\AppData\Local\Microsoft\WindowsApps;C:\Users\cpi\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code Insiders\bin
16 verbose lifecycle #systems/empty-list#1.0.0~prepublish: CWD: C:\temp\empty-list
17 silly lifecycle #systems/empty-list#1.0.0~prepublish: Args: [ '/d /s /c', 'ngc && npm run build' ]
18 silly lifecycle #systems/empty-list#1.0.0~prepublish: Returned: code: 0 signal: null
19 info lifecycle #systems/empty-list#1.0.0~prepare: #systems/empty-list#1.0.0
20 silly lifecycle #systems/empty-list#1.0.0~prepare: no script for prepare, continuing
21 verbose tar pack [ 'C:\\Users\\cpi\\AppData\\Roaming\\npm-cache\\#systems\\empty-list\\1.0.0\\package.tgz',
21 verbose tar pack 'C:\\temp\\empty-list' ]
22 verbose tarball C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package.tgz
23 verbose folder C:\temp\empty-list
24 verbose addLocalTarball adding from inside cache C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package.tgz
25 verbose correctMkdir C:\Users\cpi\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
26 silly cache afterAdd #systems/empty-list#1.0.0
27 verbose afterAdd C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package\package.json not in flight; writing
28 verbose correctMkdir C:\Users\cpi\AppData\Roaming\npm-cache correctMkdir not in flight; initializing
29 verbose afterAdd C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package\package.json written
30 silly publish { name: '#systems/empty-list',
30 silly publish version: '1.0.0',
30 silly publish description: 'An empty list',
30 silly publish scripts:
30 silly publish { clean: 'rimraf bundles coverage src/**/*.d.ts src/**/*.metadata.json src/**/*.js tests/**/*.d.ts tests/**/*.metadata.json tests/**/*.js index.d.ts index.metadata.json index.js',
30 silly publish test: 'karma start',
30 silly publish 'test-watch': 'karma start --singleRun=false --autoWatch=true',
30 silly publish prepublish: 'ngc && npm run build',
30 silly publish build: 'webpack',
30 silly publish 'semantic-release': 'semantic-release pre && npm publish && semantic-release post' },
30 silly publish repository:
30 silly publish { type: 'git',
30 silly publish url: 'git+https://github.com/systems/empty-list.git' },
30 silly publish keywords: [ 'angular', 'angular 2', 'i18n', 'translate', 'ngx-translate' ],
30 silly publish publishConfig: { registry: 'https://systems.pkgs.visualstudio.com/_packaging/Systems.Test-Packages/npm/registry/' },
30 silly publish author: { name: 'Martin Pfeifhofer' },
30 silly publish license: 'MIT',
30 silly publish bugs: { url: 'https://github.com/systems/empty-list/issues' },
30 silly publish homepage: 'https://github.com/systems/empty-list#readme',
30 silly publish main: 'bundles/empty-list.umd.js',
30 silly publish module: 'index.js',
30 silly publish typings: 'index.d.ts',
30 silly publish peerDependencies:
30 silly publish { '#ngx-translate/core': '>=6.0.0',
30 silly publish '#angular/core': '>=4.3.0',
30 silly publish '#angular/common': '>=4.3.0' },
30 silly publish devDependencies:
30 silly publish { '#angular/animations': '4.3.1',
30 silly publish '#angular/common': '4.3.1',
30 silly publish '#angular/compiler': '4.3.1',
30 silly publish '#angular/compiler-cli': '4.3.1',
30 silly publish '#angular/core': '4.3.1',
30 silly publish '#angular/platform-browser': '4.3.1',
30 silly publish '#angular/platform-browser-dynamic': '4.3.1',
30 silly publish '#angular/platform-server': '4.3.1',
30 silly publish '#ngx-translate/core': '^7.0.0',
30 silly publish '#types/hammerjs': '2.0.34',
30 silly publish '#types/jasmine': '2.5.51',
30 silly publish '#types/node': '7.0.28',
30 silly publish 'awesome-typescript-loader': '3.1.3',
30 silly publish 'clean-webpack-plugin': '0.1.16',
30 silly publish codelyzer: '3.0.1',
30 silly publish commitizen: '2.9.6',
30 silly publish 'core-js': '2.4.1',
30 silly publish 'cz-conventional-changelog': '2.0.0',
30 silly publish 'istanbul-instrumenter-loader': '2.0.0',
30 silly publish 'jasmine-core': '2.6.2',
30 silly publish karma: '1.7.0',
30 silly publish 'karma-chrome-launcher': '2.1.1',
30 silly publish 'karma-coverage': '1.1.1',
30 silly publish 'karma-jasmine': '1.1.0',
30 silly publish 'karma-mocha-reporter': '2.2.3',
30 silly publish 'karma-remap-coverage': '0.1.4',
30 silly publish 'karma-sourcemap-loader': '0.3.7',
30 silly publish 'karma-webpack': '2.0.3',
30 silly publish 'loader-utils': '1.1.0',
30 silly publish 'reflect-metadata': '0.1.10',
30 silly publish rimraf: '2.6.1',
30 silly publish rxjs: '5.4.0',
30 silly publish 'semantic-release': '6.3.6',
30 silly publish 'source-map-loader': '0.2.1',
30 silly publish 'ts-helpers': '1.1.2',
30 silly publish tslint: '5.4.3',
30 silly publish 'tslint-loader': '3.5.3',
30 silly publish typescript: '2.3.4',
30 silly publish webpack: '3.0.0-rc.1',
30 silly publish 'zone.js': '0.8.11' },
30 silly publish config: { commitizen: { path: './node_modules/cz-conventional-changelog' } },
30 silly publish dependencies: { '#ngx-translate/http-loader': '^1.0.2' },
30 silly publish readme: '',
30 silly publish readmeFilename: 'README.md',
30 silly publish gitHead: '1d90b2d0696dc11ae80de565cd09d432db693b98',
30 silly publish _id: '#systems/empty-list#1.0.0',
30 silly publish _shasum: 'fbb07f54e36cbd754375bffebaab79d9903f7c60',
30 silly publish _from: '.' }
31 info lifecycle #systems/empty-list#1.0.0~prepublishOnly: #systems/empty-list#1.0.0
32 silly lifecycle #systems/empty-list#1.0.0~prepublishOnly: no script for prepublishOnly, continuing
33 verbose getPublishConfig { registry: 'https://xxx.pkgs.visualstudio.com/_packaging/Systems.Test-Packages/npm/registry/' }
34 silly mapToRegistry name #systems/empty-list
35 silly mapToRegistry scope (from package name) #systems
36 verbose mapToRegistry no registry URL found in name for scope #systems
37 silly mapToRegistry using default registry
38 silly mapToRegistry registry https://xxx.pkgs.visualstudio.com/_packaging/Systems.Test-Packages/npm/registry/
39 silly mapToRegistry data Result {
39 silly mapToRegistry raw: '#systems/empty-list',
39 silly mapToRegistry scope: '#systems',
39 silly mapToRegistry escapedName: '#systems%2fempty-list',
39 silly mapToRegistry name: '#systems/empty-list',
39 silly mapToRegistry rawSpec: '',
39 silly mapToRegistry spec: 'latest',
39 silly mapToRegistry type: 'tag' }
40 silly mapToRegistry uri https://xxx.pkgs.visualstudio.com/_packaging/Systems.Test-Packages/npm/registry/#systems%2fempty-list
41 verbose publish registryBase https://xxx.pkgs.visualstudio.com/_packaging/Systems.Test-Packages/npm/registry/
42 silly publish uploading C:\Users\cpi\AppData\Roaming\npm-cache\#systems\empty-list\1.0.0\package.tgz
43 verbose stack Error: auth required for publishing
43 verbose stack at CachingRegistryClient.publish (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\publish.js:30:14)
43 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\publish.js:137:14
43 verbose stack at mapToRegistry (C:\Program Files\nodejs\node_modules\npm\lib\utils\map-to-registry.js:62:3)
43 verbose stack at publish_ (C:\Program Files\nodejs\node_modules\npm\lib\publish.js:108:3)
43 verbose stack at Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
43 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
43 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:18:7
43 verbose stack at done (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:132:5)
43 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:7:26)
43 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:18:7
44 verbose cwd C:\temp\empty-list
45 error Windows_NT 10.0.14393
46 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "publish"
47 error node v7.7.3
48 error npm v4.1.2
49 error code ENEEDAUTH
50 error need auth auth required for publishing
51 error need auth You need to authorize this machine using `npm adduser`
52 verbose exit [ 1, true ]
UPDATE: MyHome/.npmrc
//systems.pkgs.visualstudio.com/_packaging/Systems.Angular-Packages/npm/registry/:_authToken=xxxx
ok clearing the .npmrc file in my home folder and rerun vsts-npm-auth -config .npmrc folder solves the problem. Thanks to #starain-MSFT for his hint.