node.js npm install fs 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24594796/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
node.js npm install fs error
提问by Richard Lee
ubuntu@ip-xxx-xx-x-xxx:/var/www/html$ npm install fs
npm WARN package.json [email protected] crypto is also the name of a node core module.
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] http is also the name of a node core module.
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] querystring is also the name of a node core module.
npm WARN package.json [email protected] url is also the name of a node core module.
npm WARN package.json [email protected] util is also the name of a node core module.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'fs' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Linux 3.13.0-24-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "fs" npm ERR! cwd /var/www/html npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.14 npm ERR! code E404 npm ERR! Error: EACCES, open 'npm-debug.log' npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
错误!系统 Linux 3.13.0-24-generic npm ERR!命令 "/usr/local/bin/node" "/usr/local/bin/npm" "install" "fs" npm ERR!cwd /var/www/html npm ERR!node -v v0.10.29 npm ERR!npm -v 1.4.14 npm 错误!代码 E404 npm ERR!错误:EACCES,打开'npm-debug.log' npm ERR!{ [错误:EACCES,打开'npm-debug.log'] errno:3,代码:'EACCES',路径:'npm-debug.log'}
npm ERR! Please try running this command again as root/Administrator.
错误!请尝试以 root/管理员身份再次运行此命令。
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "fs"
npm ERR! cwd /var/www/html
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/html/npm-debug.log
npm ERR! not ok code 0
I 'm typed "npm install fs" ,but see the this error.
我输入了 "npm install fs" ,但看到这个错误。
回答by Ben
You're getting error because fs module is part of node's core modules. You don't need to install. http://nodejs.org/api/fs.html
您收到错误,因为 fs 模块是节点核心模块的一部分。您不需要安装。 http://nodejs.org/api/fs.html
回答by Abolfazl Miadian
you don't need to install nodejs internal modules, but you can update them. fs is a internal node js module!
你不需要安装 nodejs 内部模块,但你可以更新它们。fs 是一个内部节点 js 模块!

