您现在的位置是:首页 > Javascript
当前栏目
ubuntu 安装 npm、nodejs 各种问题
2023-02-18 16:46:51 时间
nodejs let notifier = require('update-notifier')({pkg}) 报错
先卸载nodejs,然后安装稳定最新版
# apt-get remove nodejs //删除nodejs
# curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - //nodejs源
# apt-get update //更新包
# apt-get install nodejs //安装nodejs
# npm install npm -g //更新npm
Cannot find module 'are-we-there-yet'
1) Go to the global node_modules directory (what would npm root -g print if you could run it):
$ cd /usr/local/lib/node_modules
2) Remove the broken npm directory or move it somewhere else (note that you might need to elevate permissions for this and the following steps):
$ mv npm /tmp
3) Download and unpack fresh npm from the registry (substitute version you want to install, e.g. 3.10.8):
$ curl -L registry.npmjs.com/npm/-/npm-{VERSION}.tgz | tar xz --transform="s:^package:npm:"
You can automate some of that with this install script:
$ curl -L https://www.npmjs.com/install.sh | sh
参考
相关文章
- ABP入门系列(8)——Json格式化
- HTML CSS3+JS实现【灵动岛】效果
- CNVD-2019-22238 fastjson反序列化漏洞
- guzzle 使用 json 作为主体请求接口
- 前端(JS)与后端(PHP) 通过 RSA 实现加解密
- js 实现版本号排序
- ‘DatePicker.RangePicker‘ cannot be used as a JSX component.
- 使用Helm部署Wikijs
- 我为什么选择Wiki.js记笔记?
- 如何通过 kubectl 进入 node shell
- JavaScript之无题之让人烦躁的模块化
- Javascript之异步循环打印这道小题
- Javascript之我也来手写一下Promise
- 《JavaScript 模式》读书笔记(8)— DOM和浏览器模式2
- 《JavaScript 模式》读书笔记(8)— DOM和浏览器模式1
- 《JavaScript 模式》读书笔记(7)— 设计模式3
- 《JavaScript 模式》读书笔记(7)— 设计模式2
- 《JavaScript 模式》读书笔记(7)— 设计模式1
- Javascript之其实我觉得原型链没有难的那么夸张!
- 《JavaScript 模式》读书笔记(6)— 代码复用模式3