从官方节点.js文档:
一个节点.js包也可以在Debian Sid(不稳定)、Jessie(测试)和Wheezy(Wheezy Backport)的官方回购协议中作为"nodejs"提供.It only installs a nodejs binary.
所以,如果你只输入sudo apt-get install nodejs
,它不会安装像npm这样的好东西.
您需要键入:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
可选:安装构建工具
要从npm编译和安装本机加载项,您可能还需要安装构建工具:
sudo apt-get install -y build-essential
更多信息:Docs NodeJs
tsc:当我上传 React+next js 和节点项目时,在 heroku 找不到
fs.writefile 选项参数的可能值,尤其是只读文件的整数
使用 node.js 发送 Content-Type: application/json post
React Hooks - 使用 useState 与仅使用变量
如何修复 Node.js 中的“ReferenceError: primordials is not defined”
错误消息:MongoError: bad auth Authentication failed through URI string
如何在 Node 中的 http.request() 上设置超时?
Webpack TypeScript module.hot 不存在
nodejs v10.3.0 的 gulp 任务问题:src\node_contextify.cc:629: Assertion `args[1]->IsString()' failed