Closed EvilG-MC closed 5 months ago
I installed lavalink-client to be used in another library outside discord.js, and at the moment of instantiating it, I get this error:
Error: Cannot find module 'tslib' Require stack: - C:\Users\JustEvil\Desktop\Stuff\djs stuff\maku-bot\node_modules\.pnpm\github.com+tomato6966+lavalink-client@525699b9a27cc83e048813474f21dcf3e48d513e\node_modules\lavalink-client\dist\cjs\index.js
To prevent saturation, I uploaded the content to
sourceb.in
.tsconfig.json
: https://sourceb.in/sN8BUvip20package.json
: https://sourceb.in/8xzdqga4aBI'm using Seyfert instead of discord.js The thing changes when I install discord.js and I don't get the error.
Issue: (ignore the modified terminal haha)
Hello, the error occurs cause tslib
is set to be an devDependencies
for now I'll request you to install tslib
for now it should work, I don't know why it doesn't error while using discord.js.
@Tomato6966 Kindly Look into, It's probably cause of importHelpers
config option in tsconfig or the package being set in devDependencies
.
How did you install lavalink-client?
It seems that, you installed it from github, and included the src folders?
The released npm project does not contain the src project and thus not require the typescript files nor the dev dependencies
also it's up to date.
Could you show what is ls node_modules/lavalink-client
How did you install lavalink-client? It seems that, you installed it from github, and included the src folders? The released npm project does not contain the src project and thus not require the typescript files nor the dev dependencies also it's up to date. Could you show what is
ls node_modules/lavalink-client
I'm here confused, you mean src the src
directory or dist
as that's what gets packed after compiling.
src === source dist === package you need, which is plain js (1 cjs, 1 mjs, and types)
src === source dist === package you need, which is plain js (1 cjs, 1 mjs, and types)
But doesn't the error stack tell that it's using JS files(built ones) in the require stack section?
With the latest commit i moved tslib to the required packages, my bad
Could you re-try and see if it solves the issue (on github) then i'll publish the change(s)
sure, just min.
With the latest commit i moved tslib to the required packages, my bad
Could you re-try and see if it solves the issue (on github) then i'll publish the change(s)
It resolves the Error.
I installed lavalink-client to be used in another library outside discord.js, and at the moment of instantiating it, I get this error:
To prevent saturation, I uploaded the content to
sourceb.in
.tsconfig.json
: https://sourceb.in/sN8BUvip20package.json
: https://sourceb.in/8xzdqga4aBI'm using Seyfert instead of discord.js The thing changes when I install discord.js and I don't get the error.
Issue: (ignore the modified terminal haha)![WindowsTerminal_u9ongTc0eF](https://github.com/Tomato6966/lavalink-client/assets/71156616/c3ebbd97-12c1-476c-9e17-a124223277a9)