问题描述
我试图设置使用约曼的AngularJS网站:
I am trying to set up an AngularJS site using Yeoman:
$ yo angular
安装是部分成功。该目录正在填充所有这些文件,但也有令我想,如果初始化完成几个误区:
The installation is partly successful. The directory is being populated with all those files, but there are also several errors that left me wondering if the init was complete:
npm ERR! Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer'
npm ERR! { [Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-56-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/username/Development/LearnAngularJS
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path ../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../grunt-autoprefixer/node_modules/autoprefixer/bin/autoprefixer'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/username/Development/LearnAngularJS/npm-debug.log
npm ERR! not ok code 0
npm ERR! Error: EACCES, symlink '../karma/bin/karma'
npm ERR! { [Error: EACCES, symlink '../karma/bin/karma'] errno: 3, code: 'EACCES', path: '../karma/bin/karma' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.2.0-56-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "grunt-karma" "karma-ng-html2js-preprocessor" "karma-ng-scenario" "--save-dev"
npm ERR! cwd /home/username/Development/LearnAngularJS
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path ../karma/bin/karma
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../karma/bin/karma'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/username/Development/LearnAngularJS/npm-debug.log
npm ERR! not ok code 0
我不知道为什么我会需要运行初始化为根,似乎并不正确。凡到底是寻找它(和失败)的那些路径../grunt-auto$p$pfixer/node_modules,../karma/bin/karma?而且,当然,我应该怎么做才能解决这个问题?
I am not sure why I'd need to run the init as root, that doesn't seem right. Where exactly is it looking (and failing) for those paths "../grunt-autoprefixer/node_modules", "../karma/bin/karma"? And, of course, what should I do to fix this behaviour?
推荐答案
这是一个VirtualBox或流浪的共享文件夹中?我得到了同样的错误,发现这是因为VirtualBox的4.18+不支持共享文件夹中的符号链接:
Is this inside a VirtualBox or Vagrant shared folder? I got the same error and found it was because VirtualBox 4.18+ does not support symlinks inside shared folders:https://www.virtualbox.org/ticket/10085
这篇关于使用约曼错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!