VincentChanX / shadowsocks-over-websocket

免费使用 Heroku 部署 shadowsocks
GNU General Public License v3.0
562 stars 1.53k forks source link

ubuntu17.10无法建立成功建立是因为nodejs不支持么 #14

Closed 1095893390 closed 7 years ago

1095893390 commented 7 years ago

我用的是ubuntu系统,在之前的16.04上成功使用,但是现在升级到17.10不能开启,显示代码如下 module.js:471 throw err; ^

Error: Cannot find module 'log4js' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/home/mahinsuen/shadowsocks-over-websocket/tcprelay.js:3:16) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) 我想是不是因为node.js并没有支持17.10的缘故官网是这么说的 Supported Ubuntu versions:

Ubuntu 14.04 LTS (Trusty Tahr) Ubuntu 16.04 LTS (Xenial Xerus)

上面的错误代码我看不懂,失败原因只是我的推测,还是想让作者大大能够给看下,谢谢啦

VincentChanX commented 7 years ago

npm install 一下 把依赖的模块装上

1095893390 commented 7 years ago

npm install The program 'npm' is currently not installed. You can install it by typing: sudo apt install npm 然后 sudo apt install npm 之后 npm install 这些成功后进行启动显示 [2017-10-23 22:22:26.140] [FATAL] local - an error of local occured { Error: listen EADDRINUSE 127.0.0.1:1080 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at Server._listen2 (net.js:1262:14) at listen (net.js:1298:10) at net.js:1408:9 at _combinedTickCallback (internal/process/next_tick.js:83:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:383:7) at startup (bootstrap_node.js:149:9) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '127.0.0.1', port: 1080 } (node:4325) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: listen EADDRINUSE 127.0.0.1:1080 自己另外查了下自己的

git version 2.14.1 node version6.11.4

作者大大有什么指示哈哈。还是看不懂那段错误代码是哪里错了 @VincentChanX

youmeiwu commented 7 years ago

我刚才遇到和你一样的问题,百度后,解决了。 我的系统是mac osx

问题是:端口被占用 解决方法是:让端口不被占用

步骤

  1. 查找端口被什么给占用了,命令行输入 lsof -i tcp:1080 会看到占用端口程序的PID数字
  2. 把这个项目关掉,命令行输入 kill 刚才那个PID数字

希望能帮到你

1095893390 commented 7 years ago

虽然又退回了Ubuntu16.04但是还是谢谢你们