Cannot `npm install`: artifactory.alteryx.com not available
Closed this issue · 4 comments
Hi everyone,
when cloning the repository and running npm install
, the installation fails with the following error message:
❯ npm install
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.alteryx.com/artifactory/api/npm/npm/yargs/-/yargs-13.3.2.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.alteryx.com
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'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/c.harms/.npm/_logs/2021-05-23T10_18_34_757Z-debug.log
The relevant lines in the log file are as follows:
1538 timing reifyNode:node_modules/@material-ui/styles Completed in 5620ms
1539 timing reifyNode:node_modules/react-select Completed in 5688ms
1540 timing reifyNode:node_modules/dom-helpers Completed in 5694ms
1541 timing reifyNode:node_modules/@alteryx/icons Completed in 5730ms
1542 timing reifyNode:node_modules/@material-ui/lab Completed in 5790ms
1543 timing reifyNode:node_modules/@alteryx/ui Completed in 5933ms
1544 timing reifyNode:node_modules/babel-plugin-polyfill-corejs3/node_modules/caniuse-lite Completed in 5996ms
1545 timing reifyNode:node_modules/lodash Completed in 6061ms
1546 timing reifyNode:node_modules/core-js Completed in 6143ms
1547 timing reifyNode:node_modules/@material-ui/core Completed in 6214ms
1548 timing reify:rollback:createSparse Completed in 982ms
1549 timing reify:rollback:retireShallow Completed in 0ms
1550 timing command:install Completed in 8025ms
1551 verbose type system
1552 verbose stack FetchError: request to https://artifactory.alteryx.com/artifactory/api/npm/npm/yargs/-/yargs-13.3.2.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.alteryx.com
1552 verbose stack at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:97:14)
1552 verbose stack at ClientRequest.emit (node:events:365:28)
1552 verbose stack at TLSSocket.socketErrorListener (node:_http_client:447:9)
1552 verbose stack at TLSSocket.emit (node:events:377:35)
1552 verbose stack at emitErrorNT (node:internal/streams/destroy:193:8)
1552 verbose stack at emitErrorCloseNT (node:internal/streams/destroy:158:3)
1552 verbose stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
1553 verbose cwd /Users/c.harms/Code/External Libs/dev-harness
1554 verbose Darwin 20.4.0
1555 verbose argv "/usr/local/Cellar/node/16.2.0/bin/node" "/usr/local/bin/npm" "install"
1556 verbose node v16.2.0
1557 verbose npm v7.13.0
1558 error code ENOTFOUND
1559 error syscall getaddrinfo
1560 error errno ENOTFOUND
1561 error network request to https://artifactory.alteryx.com/artifactory/api/npm/npm/yargs/-/yargs-13.3.2.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.alteryx.com
1562 error network This is a problem related to network connectivity.
1562 error network In most cases you are behind a proxy or have bad network settings.
1562 error network
1562 error network If you are behind a proxy, please make sure that the
1562 error network 'proxy' config is set properly. See: 'npm help config'
1563 verbose exit 1
I could not find an explicit reference to https://artifactory.alteryx.com, but I'm not very familiar with npm, so not sure where to look for a fix. At least it seems to try to get packages from this URL, which is not publicly available.
The problem occurred initially when running from a properly set up Alteryx SDK workspace.
Looking forward to a fix!
Best
Christopher
(see also my post in the Alteryx Community: https://community.alteryx.com/t5/Dev-Space/Alteryx-UI-SDK-Not-able-to-launch-Dev-Harness/td-p/763169)
Quick follow-up: when deleting the package-lock.json
file containing the URLs in question, I get a problem with the dependencies:
❯ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: dev-harness@1.0.0
npm ERR! Found: react-intl@4.7.6
npm ERR! node_modules/react-intl
npm ERR! dev react-intl@"^4.7.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-intl@"^5.8.1" from @alteryx/ui@1.0.0
npm ERR! node_modules/@alteryx/ui
npm ERR! @alteryx/ui@"^1.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/c.harms/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/c.harms/.npm/_logs/2021-05-23T10_23_31_410Z-debug.log
Hey @neurotroph, thanks so much for being the first person to file an issue with the new UI-SDK! We really appreciate the feedback.
I think this will be pretty easy to resolve. Can you do me a favor and delete both the package-lock.json file and the node_modules folder in the project? Then, do a fresh npm install.
We've opened a PR to address that here so that nobody else runs into this issue.
Thanks!
I did delete both the package-lock.json and the node_modules folder and receive the same version conflict error as above:
❯ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: dev-harness@1.0.0
npm ERR! Found: react-intl@4.7.6
npm ERR! node_modules/react-intl
npm ERR! dev react-intl@"^4.7.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-intl@"^5.8.1" from @alteryx/ui@1.0.0
npm ERR! node_modules/@alteryx/ui
npm ERR! @alteryx/ui@"^1.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/c.harms/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/c.harms/.npm/_logs/2021-05-25T09_23_14_060Z-debug.log
What did the trick for me, was to replace all "artifactory.alteryx.com" references in the package-lock.json with npm.org URLs. At least that's how I've got it to work for now. :)
@neurotroph I'm glad you came to a solution! That's essentially exactly what our PR did I linked to above did. I'm guessing the CLI cached your package-lock.json and/or node_modules and that's why deleting them and re-installing didn't do what I expected.
Moving forward, new workspaces created using the latest dev harness shouldn't have this issue.