tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.55k stars 215 forks source link

Cannot find module 'tmi.js' on Raspberry Pi #330

Closed mketcha3 closed 5 years ago

mketcha3 commented 5 years ago

Actual behaviour: Node app is unable to locate the TMI.js server on my raspberry pi. I assume this is due to the location of the file. Do you guys know where the TMI.js file should be located within a raspberry pi so that the node app can locate it?

Expected behaviour: On my PC the node app runs correctly and was able to late the TMI.js file in my /repos file.

Error log:

internal/modules/cjs/loader.js:651
    throw err;
    ^

Error: Cannot find module 'tmi.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
    at Function.Module._load (internal/modules/cjs/loader.js:575:25)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/home/pi/index/NodejsWebApp1/NodejsWebApp1/server.js:1:13)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
Insert your error log here

Server configuration

AlcaDesign commented 5 years ago

I don't own a Raspberry Pi or similar to test with, but it should be located at your-project/node_modules/tmi.js/* as it would be under normal conditions. Maybe you didn't install your project's dependencies on your device (npm install). I wouldn't necessarily suggest simply copying over the "node_modules" folder.