Getting this error when tried to run laravel-echo-server
https://github.com/tlaverdure/laravel-echo-server
Cannot proceed further...
socket.io $laravel-echo-server start
module.js:472
throw err;
^
Error: Cannot find module '/usr/local/lib/node_modules/laravel-echo-server/node_modules/sqlite3/lib/binding/node-v51-darwin-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/laravel-echo-server/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/laravel-echo-server/dist/database/sqlite.js:2:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
It looks like it's the same as #228 which is marked as "fixed". Apparently not, since I'm getting it too, not through laravel but directly when trying to require('sqlite3'). My sqlite3 is 3.1.8 and Node is 6.9.4.
I am getting a similar issue with node when starting the server on heroku. It works on local though.
Error: Cannot find module '/app/node_modules/sqlite3/lib/binding/node-v48-linux-x64/node_sqlite3.node'
My sqlite3 is 3.1.8 and Node is 6.2.1
Edit: The problem was because I was using yarn to install my dependencies and I think the .lockfile generated by yarn is setting sqlite3 to install in a 'darwin' environment (mac local), when it needs to install in a 'linux' environment when deployed. If I instead use npm install, it works.
Most helpful comment
I am getting a similar issue with node when starting the server on heroku. It works on local though.
My sqlite3 is 3.1.8 and Node is 6.2.1
Edit: The problem was because I was using yarn to install my dependencies and I think the .lockfile generated by yarn is setting sqlite3 to install in a 'darwin' environment (mac local), when it needs to install in a 'linux' environment when deployed. If I instead use npm install, it works.