启动nodejs项目时所遇到的一系列问题:Ubuntu下提示/usr/bin/env: node: 没有那个文件或目,Block-scoped declarations (let, const, fu
2018-11-20 23:43
1271 查看
问题1:Ubuntu下提示/usr/bin/env: node: 没有那个文件或目录
解决:由于Ubuntu下已经有一个名叫node的库,因此Node.js在ubuntu下默认叫nodejs,命令:
sudo ln -s /usr/bin/nodejs /usr/bin/node
问题2:SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
解决:由于nodejs版本过低导致的,更新nodejs版本,依次执行下列命令:
sudo apt-get update
没有curl,请自行安装
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
问题3:sh: 1: webpack-dev-server: not found
解决:命令:
[code]sudo cnpm install webpack-dev-server -g
如果问题太多建议重新安装用 :sudo cnpm install 把所有包都安装一遍
相关文章推荐
- Ubuntu下提示/usr/bin/env: node: 没有那个文件或目录
- Ubuntu下提示/usr/bin/env: node: 没有那个文件或目录
- Ubuntu下提示/usr/bin/env: node: 没有那个文件或目录
- ubuntu18.04创建虚拟环境时提示bash: /usr/local/bin/virtualenvwrapper.sh: 没有那个文件或目录 的解决办法
- ionic提示/usr/bin/env: node: 没有那个文件或目录
- /usr/bin/env: node: 没有那个文件或目录
- /usr/bin/env: node: 没有那个文件或目录
- 【问题】/usr/bin/env: php: 没有那个文件或目录
- hexo异常:/usr/bin/env: node: 没有那个文件或目录
- /usr/bin/env: node: 没有那个文件或目录
- 使用GitHub + Hexo搭建个人博客(八)- Hexo异常:/usr/bin/env: node: 没有那个文件或目录
- 配置webstorm使用supervisor时出现 /usr/bin/env: node: 没有那个文件或目录 解决方法
- /usr/bin/python^M: 解释器错误: 没有那个文件或目录(问题解决)
- Linux下运行bash脚本显示“: /usr/bin/env: "bash\r": 没有那个文件或目录
- 解决/usr/bin/env: php: 没有那个文件或目录
- nodejs vue SyntaxError:Block-scoped declarations (let,const,function,class) not yet supported
- 解决/usr/bin/env: php: 没有那个文件或目录
- /usr/bin/env: "python\r": 没有那个文件或目录
- 解决/usr/bin/env: php: 没有那个文件或目录
- 执行yiic出现错误 /usr/bin/env: php: 没有那个文件或目录