animetosho / Nyuu

Flexible usenet binary posting tool
221 stars 32 forks source link

Running nyuu after npm install gives error #76

Closed GeoffreyDijkstra closed 4 years ago

GeoffreyDijkstra commented 4 years ago

Ubuntu 20.04 installed nyuu through npm (which in the past worked fine for me): apt install npm npm install -g nyuu

Now I just try to run nyuu to see if it's working but I get:

[ERR ] Unexpected fatal exception encountered, stack trace below
/usr/local/lib/node_modules/nyuu/bin/nyuu.js:1117
                throw err; // this seems to change the exit code a bit :/
                ^

Error: Cannot find module './build/Release/yencode.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/nyuu/node_modules/yencode/index.js:3:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Tried to just install that package manually by running npm install -g yencode but this doesn't fix it either. Any idea what the problem might be here?

animetosho commented 4 years ago

Hi, are you able to check whether this is your issue?
If not, try doing a npm install yencode (i.e. without the -g flag) and see if that works. You can also test pulling the code from the node-yencode repository and doing a node-gyp rebuild inside to see if it works.

GeoffreyDijkstra commented 4 years ago

@animetosho Running npm install -g --unsafe-perm nyuu does the trick :smile:

Thanks for your quick reply, love this little piece of great software, keep up the good work!

animetosho commented 4 years ago

Thanks for confirming that it worked. I should update the readme with that.