2016-04-21 18 views
9

sto seguendo il corso angular2 di deborah kurata per iniziare su multalsight e installato node.js e poi ho eseguito l'installazione di npm (dopo aver installato cntlm come sono dietro un firewall proxy aziendale): tuttavia sto ricevendo il seguente erroreerrore di installazione di npm impossibile leggere le tipizzazioni

> [email protected] postinstall c:\Users\test\Documents\Visual Studio 2015\Projects\Angular2 
> typings install 

typings ERR! message Unable to read typings for "es6-shim". You should check the entry paths in "es6-shim.d.ts" are up to date 
typings ERR! caused by Unable to connect to  "https://raw.githubusercontent.com/D 
efinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/es6- shim/es6-shim.d.ts" 
typings ERR! caused by connect ECONNREFUSED 103.245.222.133:443 

typings ERR! cwd c:\Users\test\Documents\Visual Studio 2015\Projects\Angular2 

typings ERR! system Windows_NT 6.1.7601 
typings ERR! command "C:\\Program Files\\nodejs\\node.exe"  "c:\\Users\\vivekba\\ 
Documents\\Visual Studio 2015\\Projects\\Angular2\\node_modules\\typings\\dist\\ 
bin.js" "install" 
typings ERR! node -v v5.10.1 
typings ERR! typings -v 0.7.12 

typings ERR! If you need help, you may report this error at: 
typings ERR! <https://github.com/typings/typings/issues> 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: fseve 
[email protected] 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ 
node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v5.10.1 
npm ERR! npm v3.8.3 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] postinstall: `typings install` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'typings install'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the product-management package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  typings install 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs product-management 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls product-management 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  c:\Users\test\Documents\Visual Studio 2015\Projects\Angular2\npm 
+0

'causato dal collegamento ECONNREFUSED' – drewmoore

risposta

5

L'errore è causato a causa di un problema di connettività.

Il firewall è sicuramente alla base della causa.

UPDATE

Alcune persone hanno risolto questo attraverso la creazione di una configurazione -

npm config set proxy "http://company.com:8000" 

O

npm config set strict-ssl false 

O

npm config set registry "http://registry.npmjs.org/" 

Puoi anche dare un'occhiata allo issue.

secondo aggiornamento

Se stai usando VS, allora è necessario impostare la configurazione dalla console sviluppatore VS

  1. Open lo sviluppatore VS console
  2. Set NPM configurazioni
11

Se sei dietro un proxy puoi provare questo (ha funzionato per me).

Creare un file .typingsrc e aggiungere la seguente riga con le vostre informazioni di proxy:

proxy="http://proxyname:port"

Source of my answer

+1

provato ma non funziona o genera lo stesso errore. ho anche provato a usare cntlm ma finisce con lo stesso errore. – Baahubali

+2

+1 per questa risposta. Le tipizzazioni non utilizzavano l'impostazione del proxy NPM, aggiungendo il file .typingsrc con le stesse impostazioni del mio file .npmrc fatto rilevare e utilizzare correttamente il proxy – Joon

3

ho risolto seguendo il link nella risposta del Pere pagina. Ho creato un file .typingsrc con queste righe:

{ "proxy" : "http://myproxy:port/", "rejectUnauthorized" : false }

+0

questo ha funzionato per me. Grazie. –

4

ho risolto creando .typingsrc file nella stessa cartella, con il seguente contenuto:

proxy = http://username:[email protected]:port 
https-proxy = http://username:[email protected]:port 

Le parole "username", "password "," ip "e" port "dovrebbero essere sostituiti con i valori del tuo proxy.

+1

questo ha funzionato per me. Grazie –

0

Creare il file .typingscr nella cartella del progetto parallelamente a package.json e inserire sotto la riga. Ricordati di metterlo in formato ini non in formato json.

rejectUnauthorized = false 

Sto usando questo dietro ambiente aziendale, senza alcuna impostazione del proxy e ha funzionato per me, la speranza lavorerà per voi.