Ich habe ein Problem, wenn npm installieren für ein Projekt, an dem ich arbeite.Npm Installation hält Schleifen für immer
Es scheint, dass es den Befehl npm install wiederholt (bis manuell getötet). Das Seltsame ist, dass nach der ersten npm-Installation alle Abhängigkeiten installiert sind und normal funktionieren. Dies wird zu einem Problem, wenn Sie versuchen, einige CI-Tools zu verwenden, um meinen Code automatisch zu erstellen.
Ich habe dies unter den folgenden Bedingungen getestet;
- Windows-OS
- Linux OS
- Verschiedene Node/NPM-Versionen (6.x und 8.x-Zweig)
- Mit einem einfachen package.json nur einer einzigen Abhängigkeit.
- Clearing NPM cache
Versionen von Knoten/NPM derzeit verwendet wird;
- Knoten: v6.11.5
- NPM: 3.10.10
Einfache package.json, die das Problem zeigt:
{
"name": "tool",
"version": "1.0.0",
"author": "Jeff",
"description": "A starter project",
"repository": {},
"license": "UNLICENSED",
"contributors": [],
"keywords": [],
"dependencies": {
"@angular/common": "4.4.6"
},
"devDependencies": {
},
"scripts": {
"install": "npm install",
"serve-dev": "ng serve --host 0.0.0.0",
"serve-prod": "ng serve --prod --host 0.0.0.0",
"build-dev": "ng build",
"build-prod": "ng build --prod"
}
}
NPM installieren Logs:
npm -dd install
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', '-dd', 'install' ]
npm info using [email protected]
npm info using [email protected]
npm verb mapToRegistry no registry URL found in name for scope @angular
npm verb request uri https://registry.npmjs.org/@angular%2fcommon
npm verb request no auth needed
npm info attempt registry request try #1 at 3:41:11 PM
npm verb request id 10054e4c6c4b8242
npm verb etag W/"59f29d79-234ca"
npm verb lastModified Fri, 27 Oct 2017 02:44:09 GMT
npm http request GET https://registry.npmjs.org/@angular%2fcommon
npm http 304 https://registry.npmjs.org/@angular%2fcommon
npm verb headers { date: 'Fri, 27 Oct 2017 23:41:13 GMT',
npm verb headers via: '1.1 varnish',
npm verb headers 'cache-control': 'max-age=0',
npm verb headers etag: 'W/"59f29d79-234ca"',
npm verb headers age: '0',
npm verb headers connection: 'keep-alive',
npm verb headers 'x-served-by': 'cache-mdw17339-MDW',
npm verb headers 'x-cache': 'MISS',
npm verb headers 'x-cache-hits': '0',
npm verb headers 'x-timer': 'S1509147674.967823,VS0,VE358',
npm verb headers vary: 'Accept-Encoding' }
npm verb etag https://registry.npmjs.org/@angular%2fcommon from cache
npm verb get saving @angular/common to /home/jeff/.npm/registry.npmjs.org/_40angular_252fcommon/.cache.json
npm verb correctMkdir /home/jeff/.npm correctMkdir not in flight; initializing
npm verb cache add spec @angular/[email protected]
npm verb addNamed "4.4.6" is a plain semver version for @angular/common
npm verb mapToRegistry no registry URL found in name for scope @angular
npm verb addNameVersion registry:https://registry.npmjs.org/@angular%2fcommon not in flight; fetching
npm verb get https://registry.npmjs.org/@angular%2fcommon not expired, no request
npm verb afterAdd /home/jeff/.npm/@angular/common/4.4.6/package/package.json not in flight; writing
npm verb correctMkdir /home/jeff/.npm correctMkdir not in flight; initializing
npm verb afterAdd /home/jeff/.npm/@angular/common/4.4.6/package/package.json written
npm verb request uri https://registry.npmjs.org/tslib
npm verb request no auth needed
npm info attempt registry request try #1 at 3:41:14 PM
npm verb etag W/"59dd9f6d-4c68"
npm verb lastModified Wed, 11 Oct 2017 04:34:53 GMT
npm http request GET https://registry.npmjs.org/tslib
npm http 304 https://registry.npmjs.org/tslib
npm verb headers { date: 'Fri, 27 Oct 2017 23:41:15 GMT',
npm verb headers via: '1.1 varnish',
npm verb headers 'cache-control': 'max-age=300',
npm verb headers etag: 'W/"59dd9f6d-4c68"',
npm verb headers age: '172',
npm verb headers connection: 'keep-alive',
npm verb headers 'x-served-by': 'cache-mdw17339-MDW',
npm verb headers 'x-cache': 'HIT',
npm verb headers 'x-cache-hits': '1',
npm verb headers 'x-timer': 'S1509147675.077783,VS0,VE0',
npm verb headers vary: 'Accept-Encoding, Accept' }
npm verb etag https://registry.npmjs.org/tslib from cache
npm verb get saving tslib to /home/jeff/.npm/registry.npmjs.org/tslib/.cache.json
npm verb correctMkdir /home/jeff/.npm correctMkdir not in flight; initializing
npm verb cache add spec [email protected]^1.7.1
npm verb addNamed ">=1.7.1 <2.0.0" is a valid semver range for tslib
npm verb addNameRange registry:https://registry.npmjs.org/tslib not in flight; fetching
npm verb get https://registry.npmjs.org/tslib not expired, no request
npm verb addNamed "1.8.0" is a plain semver version for tslib
npm verb afterAdd /home/jeff/.npm/tslib/1.8.0/package/package.json not in flight; writing
npm verb correctMkdir /home/jeff/.npm correctMkdir not in flight; initializing
npm verb afterAdd /home/jeff/.npm/tslib/1.8.0/package/package.json written
npm info lifecycle [email protected]~preinstall: [email protected]
npm verb correctMkdir /home/jeff/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm verb unbuild node_modules/.staging/@angular/common-b1bc935a
npm verb unbuild node_modules/.staging/tslib-34a2ed6e
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/@angular/common-b1bc935a
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/tslib-34a2ed6e
npm verb tar unpack /home/jeff/.npm/@angular/common/4.4.6/package.tgz
npm verb tar unpacking to /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/@angular/common-b1bc935a
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/@angular/common-b1bc935a
npm verb tar unpack /home/jeff/.npm/tslib/1.8.0/package.tgz
npm verb tar unpacking to /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/tslib-34a2ed6e
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/tslib-34a2ed6e
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/tslib-34a2ed6e/node_modules
npm verb gentlyRm don't care about contents; nuking /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging/@angular/common-b1bc935a/node_modules
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle @angular/[email protected]~preinstall: @angular/[email protected]
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm info linkStuff @angular/[email protected]
npm verb linkBins @angular/[email protected]
npm verb linkMans @angular/[email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle @angular/[email protected]~install: @angular/[email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle @angular/[email protected]~postinstall: @angular/[email protected]
npm verb unlock done using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm info lifecycle [email protected]~install: [email protected]
> [email protected] install /mnt/c/work/personal/LiveXSLTransformUI/tmp
> npm install
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm verb correctMkdir /home/jeff/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm verb unlock done using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm info lifecycle [email protected]~install: [email protected]
> [email protected] install /mnt/c/work/personal/LiveXSLTransformUI/tmp
> npm install
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm verb correctMkdir /home/jeff/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm verb unlock done using /home/jeff/.npm/_locks/staging-950641377131bc6f.lock for /mnt/c/work/personal/LiveXSLTransformUI/tmp/node_modules/.staging
npm info linkStuff [email protected]
npm verb linkBins [email protected]
npm verb linkMans [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm 5.5.1 ist jetzt out. Vielleicht ist es Zeit für ein Upgrade (?). –
Ich habe 5.5.1 versucht, und das gleiche Problem besteht fort. Der Grund für die Verwendung der Version I ist, dass sie mit der Version von node.js geliefert wird, die ich installiert habe. – Jeff
Das nach dem Entfernen der 'install'-Zeile aus dem Skript-Abschnitt der package.json. –