npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'

最近想试下当前的当红炸子鸡 Nodejs,在安装配置时,发生了下面的错误:

C:\nodejs\npmjs\bin>cd ..

C:\nodejs\npmjs>cd ..

C:\nodejs>npm -v
1.4.28

C:\nodejs>npm config set prefix "D:\NodeLearn\node-global"

C:\nodejs>npm config set cache "D:\NodeLearn\node-cache"
Error: ENOENT, stat ‘D:\NodeLearn\node-global‘

原因是没有手动建立文件夹: node-global 和 node-cache,收到建立文件夹之后,就不报错了。

C:\nodejs>npm config set cache "D:\NodeLearn\node-cache"

C:\nodejs>npm config set prefix "D:\NodeLearn\node-global"

然后将 D:\NodeLearn\node-global, C:\nodejs\node_modules 加入系统 path.

安装express:

C:\nodejs>npm install express
[email protected] node_modules\express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected])

C:\nodejs>

安装百度fis:

C:\nodejs>npm install -g fis
npm ERR! git clone https://github.com/pipobscure/fsevents undefined
npm ERR! git clone https://github.com/pipobscure/fsevents undefined
npm WARN optional dep failed, continuing [email protected]+https://github.com/pipobscure/fsevents#7dcdf9fa3f8956610fd6f69f72c67bace2de7138
npm WARN optional dep failed, continuing [email protected]
D:\NodeLearn\node-global\fis -> D:\NodeLearn\node-global\node_modules\fis\bin\fis
[email protected]1.8.13 D:\NodeLearn\node-global\node_modules\fis
├── fis[email protected]
├── fis[email protected].0.7
├── fis[email protected]
├── fis-deploy-default@0.0.2
├── [email protected]0.6.2
├── [email protected]1.3.2 ([email protected])
├── fis[email protected] ([email protected])
├── fis[email protected] ([email protected])
├── fis[email protected] ([email protected], [email protected], [email protected])
├── fis[email protected] ([email protected], [email protected])
├── fis[email protected] ([email protected], [email protected])
├── fis[email protected] ([email protected])
└── fis[email protected] ([email protected], [email protected])

安装报了一个错,但是最终好像还是成功了^_^?

npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'

时间: 2024-10-06 02:17:46

npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'的相关文章

node 中 npm报错 Error: ENOENT, stat 'C:\Users\Administrator\AppData\Roaming\npm'

今天在看node书本时,安装express,看看里面的包.没想到出现这样一种情况. 报错了.后来思考了一下,可能是修改了node的默认安装路径.于是准备在出错的路径下建一个npm文件夹. 注意,有个时候会出现找不到AppData文件夹.看图: 看到这张图时大家应该明白了.因为这张图是隐藏起来的.大家要把他显示出来.至于如何在win7下显示文件夹,就不在这罗嗦了. 完成npm文件夹的创建后: 安装express试试: 看到下面那么一大坨东西,相信大家已经知道express暗转成功了. 在看看有没有

npm install报错Error: ENOENT

E:\projects\ueditor\ueditor1_4_3_3-src>npm installError: ENOENT, stat 'C:\Users\Lucas\AppData\Roaming\npm' at Error (native) 其实错误是由于找不到该路径下npm目录所致,手工路径 'C:\Users\Lucas\AppData\Roaming\npm' 下创建npm目录解决.

Rabbitmq 服务启动后停止 | Windows下启动报错Error: unable to connect to node [email protected]: nodedown

1.erlang版本和rabbitmq版本不匹配 版本匹配: http://www.rabbitmq.com/which-erlang.html 2.找到匹配的版本,卸载当前rabbitmq重新安装. 执行以下操作从计算机中完全卸载RabbitMQ和Erlang: (1)打开Windows控制面板,双击“程序和功能”. (2)在当前安装的程序列表中,右键单击RabbitMQ Server,然后单击“卸载”. (3)在当前安装的程序列表中,右键单击“Erlang OTP”,然后单击“卸载”. (4

全局安装的 webpack运行时 报错 Error: Cannot find module 'webpack' ......

全局安装的webpack   安装指令如下 cnpm install wepack -save-dev -g 但是 在我的项目空间运行webpack指令的时候 会报如下错误 为了方便抓取{ Error: Cannot find module 'webpack' at Function.Module._resolveFilename (module.js:527:15) at Function.Module._load (module.js:476:23) at Module.require (m

nodejs express 启动报错 Error Cannot find module 'xxx'

nodejs express 启动报错:Error: Cannot find module 'xxx',这是因为缺少模块的引用. 比如我在代码中使用了'express-session',但是却没有在 package.json 文件的 "dependencies" 项中添加 'express-session' 的依赖 D:\nodejs\myapp>set DEBUG=myapp & npm start > myapp@0.0.0 start D:\nodejs\my

webpack使用babel报错:Error: Cannot find module '@babel/core'

这两天再回顾配置webpack,当使用到webpack配置babel时候报错了.没有找到babel/core 查看了一下文档,才发现,是因为版本问题 默认babel-loader | babel对应的版本需要一致.所以回退到@7版本就可以.. npm install -D [email protected]7 babel-core babel-preset-env 这样就解决啦. webpack使用babel报错:Error: Cannot find module '@babel/core' 原

git push报错error: failed to push some refs to '[email protected]:

$ git push -u origin master To [email protected]:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint:

Mysql多实例进入db报错ERROR 2002

今天做了mysql多实例实验, 进入3307没问题 进入3306: 进入: mysql -S /data/3306/mysql.sock报错: ERROR 2002 (HY000):Can't connect to local MySQL server 解决: 1. kill 33934 kill 34228 2, 我把启动脚本mysql中的密码去掉了 我把启动脚本mysql 统统chmod +x处理(之前是700) 3,重启 mysqld_safe --defaults-file=/data/

安装MySQL-python报错error: command 'gcc' failed with exit status 1

[[email protected] MySQL-python-1.2.3]# python setup.py install function) .... _mysql.c:133: error: 'ER_SYNTAX_ERROR' undeclared (first use in this function) _mysql.c:380: error: '_mysql_ConnectionObject' has no member named 'connection' _mysql.c:382