[英]npm live-server install: symlink error (even when running as root/admin)
I'm working with an AngularJS tutorial book ( Unraveling AngularJS 1.5 (With Over 130 Complete Samples by István Novák) ) which requires Node.js to be installed. 我正在使用一本需要安装Node.js的AngularJS教程书(《 解开AngularJS 1.5(IstvánNovák的130多个完整示例 )》 )。 In the appendix in the back of the book, it lists command line codes to install various packages to work with Node.js, using NPM.
在本书后面的附录中,它列出了命令行代码,以使用NPM安装各种程序包以与Node.js一起使用。 The last component listed is live-server .
列出的最后一个组件是live-server 。 I am running the following commands:
我正在运行以下命令:
npm init -y
npm install angular@^1.5.0 --save
npm install angular-messages@^1.5.0 --save
npm install angular-route@1.5.0-beta.2 --save
npm install bootstrap --save
npm install jquery --save
npm install live-server --save-dev
Everything worked just fine except for live-server. 除了实时服务器,其他一切都正常。 When I try to install this component, I get the following error messages (this is pulled from the
npm-debug.log
file): 当我尝试安装此组件时,收到以下错误消息(这是从
npm-debug.log
文件中提取的):
335 warn UnravelingAngular1.5@1.0.0 No repository field.
336 verbose stack Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime'
336 verbose stack at Error (native)
337 verbose cwd /media/usb/AngularJS Test/Samples
338 error Linux 4.4.0-31-generic
339 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "live-server" "--save-dev"
340 error node v4.4.7
341 error npm v3.10.5
342 error path ../mime/cli.js
343 error code EPERM
344 error errno -1
345 error syscall symlink
346 error Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime'
346 error at Error (native)
346 error { [Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime']
346 error errno: -1,
346 error code: 'EPERM',
346 error syscall: 'symlink',
346 error path: '../mime/cli.js',
346 error dest: '/media/usb/AngularJS Test/Samples/node_modules/.bin/mime',
346 error parent: 'UnravelingAngular1.5' }
347 error Please try running this command again as root/Administrator.
348 verbose exit [ -1, true ]
As to the line at the end suggesting running as root/admin -- I've tried this using root (I'm on Ubuntu 16.04 LTS), with the same unsuccessful result (same error codes and everything). 至于最后一行建议以root / admin身份运行-我已经使用root尝试了此操作(我在Ubuntu 16.04 LTS上),但结果不成功(相同的错误代码和所有错误)。 Apparently it's a symlink issue, but I know nothing about those.
显然这是一个符号链接问题,但我对此一无所知。 All other components downloaded via NPM worked just fine.
通过NPM下载的所有其他组件都可以正常工作。
How would one resolve the symlink issue as suggested? 如何按照建议解决符号链接问题?
Please check: 347 error Please try running this command again as root/Administrator. 请检查: 347错误请尝试以root / Administrator身份再次运行此命令。 If not, you should try to check compatible node module version.
如果不是,则应尝试检查兼容的节点模块版本。 You can remove and install lite-server by command npm install lite-server -g .
您可以通过命令npm install lite-server -g删除和安装lite-server。 lite-server can install separately.
lite-server可以单独安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.