Discord.js: Updated discordjs but modules folder missing prism-media/core directory.

Created on 16 Feb 2019  Â·  3Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
After I updated discord.js, I get an error while booting my bot that says it can't find ../src/core/ directory from node_modules/discord.js/node_modules/prism-media/core I checked to see if the directory was there but it wasn't so I had to manually download the files and make the core directory. I have tried clearing my entire node_modules folder and reinstalling the packages but still got the error.

Include a reproducible code sample here, if possible:

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

Error: Cannot find module '../core/WebmBase'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
    at Function.Module._load (internal/modules/cjs/loader.js:539:25)
    at Module.require (internal/modules/cjs/loader.js:667:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/Desktop/highlight/node_modules/discord.js/node_modules/prism-media/src/opus/WebmDemuxer.js:1:87)
    at Module._compile (internal/modules/cjs/loader.js:738:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
    at Module.load (internal/modules/cjs/loader.js:630:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
    at Function.Module._load (internal/modules/cjs/loader.js:562:3)

Further details:

  • discord.js version: master branch (0564c5c777cfd2391261417a2047d4d7f92474ca)
  • Node.js version: v11.10.0
  • Operating system: Ubuntu 18.04.1 LTS 64-bit
  • Priority this issue should have – please be realistic and elaborate if possible:
  • [x] I have also tested the issue on latest master, commit hash:
dependencies discussion

Most helpful comment

Installing with yarn works

All 3 comments

This is an issue with npm:

https://github.com/npm/npm-packlist/issues/24

https://npm.community/t/npm-pack-leaving-out-files-6-8-0-only/5382/7

Someone thought it would be a good idea to blacklist core folders from being packed/installed...

I might consider one of the workarounds they've posted

Installing with yarn works

Will close this issue when [email protected] releases

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tom-barnes picture tom-barnes  Â·  3Comments

Lombra picture Lombra  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

smchase picture smchase  Â·  3Comments

PassTheMayo picture PassTheMayo  Â·  3Comments