错误列表
1,
/usr/bin/env: node: No such file or directory
解决方法:
ln -s /usr/bin/nodejs /usr/bin/node
2,
npm ERR! Error: UNKNOWN, symlink '../mime/cli.js'
解决方法:
npm install --no-bin-links
详细介绍:https://github.com/npm/npm/issues/8182
3,
../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
解决方法
sudo apt-get install libkrb5-dev
详细介绍:https://github.com/christkv/kerberos/issues/21
4,
SyntaxError: Use of const in strict mode
报错原因:使用了strict mode即严格的JS语法模式
两种解决方法:
1,和谐模式启动,修改package.json文件的启动脚本,添加 –harmony
"scripts": { "start": "node --harmony ./bin/www" },
2,安装x4版本的nodejs,安装方法请参考官网介绍,地址:https://github.com/nodesource/distributions#debinstall
Leave a Reply