it's bugging for me

Cannot use import statement outside of a module
70 Replies
Favna
Favna•15mo ago
Choose between using ESM and CJS, don't try to use ESM code in a CJS setup. Whatever you did with your code, that's your problem.
Yoozi
Yoozi•15mo ago
but it's not in ESM(that's all I have btw)
simxnet
simxnet•15mo ago
you mostly are trying to run .ts files you must compile them into js
Yoozi
Yoozi•15mo ago
the files names are "index.js" and "ping.js" as the guide said
simxnet
simxnet•15mo ago
mmm package.json has type module?
Yoozi
Yoozi•15mo ago
yes
Yoozi
Yoozi•15mo ago
simxnet
simxnet•15mo ago
wait wait show me the entire package.json
Yoozi
Yoozi•15mo ago
simxnet
simxnet•15mo ago
lolololol you have the type option as a dependency place it below "main"
Yoozi
Yoozi•15mo ago
the sapphire framework? ohhh
simxnet
simxnet•15mo ago
huh?
Yoozi
Yoozi•15mo ago
the type mb
simxnet
simxnet•15mo ago
yes
Want results from more Discord servers?
Add your server