PHP项目Vagrant设置错误[NodeJS安装步骤]



我正在使用virtualbox上的vagrant在Windows 10上的vagrant进行设置,当我点击

时,在命令行上

vagrant up

设置开始,在此步骤设置期间

==> default: TASK [app : Angular - Install dependencies]

我遇到此错误

        ==> default: TASK [app : Angular - Install dependencies] ************************************
    ==> default: fatal: [10.91.0.102]: FAILED! => {"changed": true, "cmd": "npm install", "delta": "0:06:23.111672", "end": "2017-10-05 05:46:47.136976", 
    "failed": true, "msg": "non-zero return code", "rc": 185, "start": "2017-10-05 05:40:24.025304", "stderr": "npm WARN deprecated typings@2.1.1: 
    Typings is deprecated in favor of NPM @types -- see README for more informationnnpm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issuennpm WARN optional
     SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):nnpm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} 
     (current: {"os":"linux","arch":"x64"})nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/common@>=4.3.0
     but none was installed.nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/compiler@>=4.3.0 but none was installed.nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/core@>=4.3.0
     but none was installed.nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/forms@>=4.3.0 but none was installed.nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of rxjs@>=5.4.3 
     but none was installed.nnpm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of typescript@>=2.4.2 but none was installed.nnpm ERR! Linux 3.13.0-132-genericnnpm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" 
     "install"nnpm ERR! node v7.0.0nnpm ERR! npm  v3.10.8nnpm ERR! path ../typescript/bin/tsservernnpm ERR! code EPROTOnnpm ERR! errno -71nnpm ERR! syscall symlinknnnpm 
     ERR! EPROTO: protocol error, symlink '../typescript/bin/tsserver' -> '/vagrant/angular_admin/node_modules/@angular-devkit/build-optimizer/node_modules/.bin/tsserver'nnpm ERR! nnpm ERR! If you need help,
     you may report this error at:nnpm ERR!     <https://github.com/npm/npm/issues>nnnpm ERR! Please include the following file with any support request:nnpm ERR!    
     /vagrant/angular_admin/npm-debug.log", "stderr_lines": ["npm WARN deprecated typings@2.1.1: Typings is deprecated in favor of NPM @types -- see README for more information", "npm WARN deprecated minimatch@0.3.0: 
     Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue", "npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):", 
     "npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})", "npm WARN ngx-bootstrap@2.0.0-beta.6 
     requires a peer of @angular/common@>=4.3.0 but none was installed.", "npm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/compiler@>=4.3.0 but none was installed.", "npm WARN ngx-bootstrap@2.0.0-beta.6 
     requires a peer of @angular/core@>=4.3.0 but none was installed.", "npm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of @angular/forms@>=4.3.0 but none was installed.", "npm WARN ngx-bootstrap@2.0.0-beta.6
     requires a peer of rxjs@>=5.4.3 but none was installed.", "npm WARN ngx-bootstrap@2.0.0-beta.6 requires a peer of typescript@>=2.4.2 but none was installed.", "npm ERR! Linux 3.13.0-132-generic", 
     "npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"", "npm ERR! node v7.0.0", "npm ERR! npm  v3.10.8", "npm ERR! path ../typescript/bin/tsserver", "npm ERR! code EPROTO", "npm ERR! errno -71",
     "npm ERR! syscall symlink", "", "npm ERR! EPROTO: protocol error, symlink '../typescript/bin/tsserver' -> '/vagrant/angular_admin/node_modules/@angular-devkit/build-optimizer/node_modules/.bin/tsserver'", "npm ERR! ",
     "npm ERR! If you need help, you may report this error at:", "npm ERR!     <https://github.com/npm/npm/issues>", "", "npm ERR! Please include the following file with any support request:", "npm ERR!    
     /vagrant/angular_admin/npm-debug.log"], "stdout": "angular_admin@2.0.1 /vagrant/angular_adminn├── @angular/animations@4.0.3 n├── UNMET PEER DEPENDENCY @angular/common@4.0.3n├── UNMET PEER DEPENDE

错误很长,所以我只是复制了其中的一部分。

现在显示此错误http://mysticpaste.com/3op1njg73p

任何帮助都非常感谢。

看起来您无法使用符号链接。

您有一些选择:

  • 尝试将--no-bin-links标志添加到npm install命令或设置在全局配置中为默认值(npm config set bin-links false)。
  • 如果您在Windows的顶部运行Vagrant,请尝试运行 vagrant up作为addMinistrator。

如果您不想将VirtualBox作为管理员运行,则可以为所有用户创建SymLink:

  • 打开本地组策略编辑(gpedit.msc
  • 编辑Create symbolic links策略:计算机配置→Windows设置→安全设置→本地策略→用户权利分配→创建符号链接

最新更新