2017-09-11 16 views
0

Ich möchte phantomJS Bibliothek zu meinem angular4 Projekt zu einer kontinuierlichen Integration mit Jenkins hinzufügen. Ich habe versucht, es auf viele Arten zu tun, aber ich bekomme immer den gleichen (oder ähnlichen) Fehler.Phantom-js kann nicht in eckiges Projekt installiert werden.

Zum Beispiel für this Tutorial, als ich versuchte PhantomJS und Launcher auf diese Weise installieren: npm install --save-dev phantomjs-prebuilt karma-phantomjs-launcher ich habe Fehler:

npm ERR! path C:\Users\jarkro\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\node_modules\sshpk\node_modules\assert-plus\package.json 
npm ERR! code EPERM 
npm ERR! errno -4048 
npm ERR! syscall unlink 
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\jarkro\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\node_modules\sshpk\node_modules\assert-plus\package.json' 
npm ERR!  at Error (native) 
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\jarkro\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\node_modules\sshpk\node_modules\assert-plus\package.json' 
npm ERR!  at Error (native) 
npm ERR! cause: 
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\jarkro\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\node_modules\sshpk\node_modules\assert-plus\package.json' 
npm ERR!  at Error (native) 
npm ERR!  errno: -4048, 
npm ERR!  code: 'EPERM', 
npm ERR!  syscall: 'unlink', 
npm ERR!  path: 'C:\\Users\\jarkro\\AppData\\Roaming\\npm\\node_modules\\phantomjs-prebuilt\\node_modules\\sshpk\\node_modules\\assert-plus\\package.json' }, 
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\jarkro\\AppData\\Roaming\\npm\\node_modules\\phantomjs-prebuilt\\node_modules\\sshpk\\node_modules\\assert-plus\\package.json\'\n at Error (native)', 
npm ERR! errno: -4048, 
npm ERR! code: 'EPERM', 
npm ERR! syscall: 'unlink', 
npm ERR! path: 'C:\\Users\\jarkro\\AppData\\Roaming\\npm\\node_modules\\phantomjs-prebuilt\\node_modules\\sshpk\\node_modules\\assert-plus\\package.json', 
npm ERR! parent: 'phantomjs-prebuilt' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 

Zur Klarstellung: Ich Administrator praviliage haben.

Jeder kann mir helfen und mir sagen, was los ist?

+0

Alles, was ich Ihnen sagen kann, ist, dass Sie nicht Admin-Privileg haben ... Sind Sie sicher, dass Sie Ihre Konsole als Administrator gestartet? Ansonsten, sorry, ich kann dir nicht helfen. – trichetriche

+0

Ja, da bin ich mir sicher. Ich habe es aus einem bestimmten Grund geschrieben –

Antwort

0

Ok. Ich habe eine Lösung gefunden. Die Hilfe wurde von here und here verschoben.

Neueste npm-Version haben einige Bugs mit der Installation von Bibliotheken, vor allem in dem Fall, wenn es fsevent Abhängigkeit verwenden. In meinem Fall muss ich npm auf Version 5.0.3 downgraden.

Verwenden Sie einfach den Befehl:

npm install -g [email protected] 
Verwandte Themen