Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing happens when running scripts #4515

Open
2 tasks done
Youritch opened this issue Dec 15, 2024 · 4 comments
Open
2 tasks done

Nothing happens when running scripts #4515

Youritch opened this issue Dec 15, 2024 · 4 comments
Labels

Comments

@Youritch
Copy link

Node.js Version

v20.18.0

NPM Version

v10.8.2

Operating System

Darwin MacBook-Air-de-Youri.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:14 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T8103 arm64

Subsystem

Other

Description

This not the first time it happened, i run my js script, that perfectly work (it as already run), but then nothing happens, like really nothing, it seem toi be coming from the require like this const {Client, GatewayIntentBits, Partials, Collection} = require("discord.js");
i noted that removing the package imported to crash the process because the module doesn't exist.
it's really disturbing, for now the only fix i found is to delete the node_modules folder and do npm i again.
i have tried to remove npm cache but didn't change any thing.

Minimal Reproduction

That a good question, it's randomly happend, and a friend of mine did have the same issue but on window
it's not seem to be link to any particular project as none of my node project can run.

Output

No response

Before You Submit

  • I have looked for issues that already exist before submitting this
  • My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask
@Domi83s

This comment has been minimized.

@preveen-stack
Copy link
Contributor

can you check with
node --inspect --trace-async-hooks --trace-event-loop --trace-modules your_script.js

@Youritch
Copy link
Author

i think there is an issue in the parameters because i get this :

node: bad option: --trace-async-hooks
node: bad option: --trace-event-loop
node: bad option: --trace-modules

So i did it with out --trace-async-hooks --trace-event-loop --trace-modules

Debugger listening on ws://127.0.0.1:9229/bc8ed3c8-75d9-4fe5-b572-2e836c9b2ac6
For help, see: https://nodejs.org/en/docs/inspector

@Youritch
Copy link
Author

As i started a new project, i still had the issue, but this time after running npm cache clear --force did fix the issue.
I forgot to say that node/npm were install using nvm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants