ubuntu 安装 npm、nodejs 各种问题
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
参考
ubuntu 安装 npm、nodejs 各种问题的更多相关文章
- Ubuntu安装新版本nodejs的5种姿势
引言: 写这篇文章之前,关于ubuntu14.04(Trusty)默认安装的NodeJS版本是0.10.25百思不解(什么鬼,哪一年的NodeJS) 写这篇文章之时,NodeJS的LTS版本号都已经1 ...
- ubuntu 安装nodejs/npm
安装发行稳定版 Ubuntu 默认仓库里带有Node.js,版本较旧,这并不是最新版,但是应该很稳定.执行如下命令: 1 2 sudo apt-getupdate sudo apt-getinst ...
- ubuntu 安装Nodejs
ubuntu 安装Nodejs 1.在软件管理器里面安装nodejs2.由于版本很老,所以需要更新版本:先安装npm , sudo apt install npm然后用npm安装 n 命令,更新nod ...
- Ubuntu安装Node和npm
本文简单介绍在Ubuntu上安装最新版本的node和npm. 本次试验环境是Ubuntu 18.10. 安装nodejs root@ubuntu:~# cat /etc/issue Ubuntu 18 ...
- ubuntu 安装 nodejs
http://blog.csdn.net/caib1109/article/details/51804687 我的系统环境: Ubuntu 16.04 64位 本文内容亲测可用, 请放心食用 使用淘宝 ...
- 安装了nodejs后在命令行运行npm报错
安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types' 解决方法:删除目录“C:\Users\mengxiaobo\ ...
- 安装nodejs安装npm安装cpnm安装vue-cli脚手架
1.为什么用nodejs 因为它是javascript运行环境,不同系统直接运行各种编程语言 是我即将使用vue的推荐开发环境. 选择对应版本,https://nodejs.org/en/downlo ...
- ubuntu安装最新版node和npm
1.先在系统上安装好nodejs和npm sudo apt-get install nodejs-legacy sudo apt-get install npm 2.升级n ...
- nodeJs 安装 npm nodeModules package.json
Nodejs 1.安装nodejs 从nodejs官网下载最新版本的node,设置环境变量这样就可以在cmd下直接用命令行操作npm 环境变量:path d:/nodejs 查看本机node及n ...
随机推荐
- Python 列表list
列表list: [ ] 类似Java中的数组. 通过索引可以取到具体位置上的值. names = ["ZhangYang","WangGui","Li ...
- stack的empty()
public static void main(String[] args) { Stack stack=null; System.out.println("1."+stack.e ...
- Elasticsearch笔记八之脑裂
Elasticsearch笔记八之脑裂 概述: 一个正常es集群中只有一个主节点,主节点负责管理整个集群,集群的所有节点都会选择同一个节点作为主节点所以无论访问那个节点都可以查看集群的状态信息. 而脑 ...
- guid.go
] = byte(g) hex.Encode(h[:], b[:]) return h }
- ConnectionString 属性尚未初始化
关于"ConnectionString 属性尚未初始化"的问题(如下图), 我在下面一段代码中发现了问题所在: public bool ReturnFlag(stri ...
- 网络流解线性规划问题 BZOJ1061: [Noi2008]志愿者招募
线性规划定义: 在给定有限的资源和竞争约束情况下,很多问题都可以表述为最大化或最小化某个目标.如果可以把目标指定为某些变量的线性函数,而且如果可以将资源约束指定为这些变量的等式或不等式,则得到了一个线 ...
- 你真的知道final关键字吗?
概述 final在英文中是最终的,不可更改的.在Java中final修饰变量,函数和类,就像这个单词的意思,一旦使用赋值之后不可更改. final修饰的变量不可以被改变 finalTest类 publ ...
- Java8新特性之一:Lambda表达式
Java8是自java5之后最重大的一次更新,它给JAVA语言带来了很多新的特性(包括编译器.类库.工具类.JVM等),其中最重要的升级是它给我们带来了Lambda表达式和Stream API. 1. ...
- token:NLP之词形还原
已迁移到我新博客,阅读体验更佳token:NLP之词形还原 完整代码实现放在我的github上:click me 一.任务描述 形态还原算法: 输入一个单词 如果词典里有该词,输出该词及其属性,转4, ...
- Wmyskxz文章目录导航附Java精品学习资料
前言:这段时间一直在准备校招的东西,所以一晃眼都好长时间没更新了,这段时间准备的稍微好那么一点点,还是觉得准备归准备,该有的学习节奏还是要有..趁着复习的空隙来整理整理自己写过的文章吧..好多加了微信 ...