2016-12-05 1 views
0

Frage mich nur, wenn jemand etwas Licht auf npm install läuft auf Virtualbox Maschine vergießen konnte (mit Ubuntu v16.4 installiert ist) .. Ich bin das leid der Fehler immerNpm installieren Problem auf Virtualbox mit Ubuntu installiert

[email protected]:/media/sf_ubuntu/angular$ npm install 
[email protected] /media/sf_ubuntu/angular 
├── UNMET PEER DEPENDENCY @angular/[email protected] 
└── UNMET PEER DEPENDENCY @angular/[email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 
npm WARN [email protected] requires a peer of @angular/[email protected]~2.1.1 but none was installed. 
npm WARN [email protected] requires a peer of @angular/[email protected]~2.1.1 but none was installed. 
npm WARN [email protected] No repository field. 
npm ERR! Linux 4.8.0-22-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" 
npm ERR! node v6.9.1 
npm ERR! npm v3.10.8 
npm ERR! path ../acorn/bin/acorn 
npm ERR! code EROFS 
npm ERR! errno -30 
npm ERR! syscall symlink 

npm ERR! rofs EROFS: read-only file system, symlink '../acorn/bin/acorn' -> '/media/sf_ubuntu/angular/node_modules/.bin/acorn' 
npm ERR! rofs This is most likely not a problem with npm itself 
npm ERR! rofs and is related to the file system being read-only. 
npm ERR! rofs 
npm ERR! rofs Often virtualized file systems, or other file systems 
npm ERR! rofs that don't support symlinks, give this error. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /media/sf_ubuntu/angular/npm-debug.log 
npm ERR! code 1 
+0

Ist 'schreibgeschützt' für Ihren freigegebenen Virtualbox-Ordner ausgewählt? – Aurora0001

+0

Was ist/media/sf_ubuntu/eckig? Ist es ein Netzwerkpfad oder ein Wechseldatenträger? Wenn ja, müssen Sie seine Berechtigungen überprüfen. – jsalatas

+0

Es scheint sich um ein Berechtigungsproblem zu handeln. Ich musste die package.json in einen Ordner innerhalb der Ubuntu HDD verschieben. Es läuft jetzt in Ordnung. Danke –

Antwort

1

Virtualbox schränkt das Erstellen von Symlinks im gemeinsamen Verzeichnis hinsichtlich der Sicherheit ein. So sollten Sie eine entsprechende Funktion öffnen:

  1. Schließen Virtualbox

  2. Fügen Sie den Installationspfad von Virtualbox auf Umgebungsvariable PATH

  3. Führen Sie den Befehl unten in cmd

    VBoxManage setextradata <VM_NAME> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<SHARE_NAME(without the sf_ prefix)> 1

  4. Führen Sie Virtualbox mit Admin

+1

Irgendwie ist der oben gezeigte Code unvollständig. Code hier vervollständigen. VBoxManage setextradata VBoxInternal2/SharedFoldersEnableSymlinksCreate/ 1 – Sevenskey