Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Java New to coding, need some slight help

ManiacTheJuan

New Coder
Hello i've recently started learning java. I'm still a newbie and i couldn't find any solution to this error i keep getting when i try to run my program

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

Error: Cannot find module 'C:\Users\shrmm\Desktop\Bot\project1.js'
[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:835:27)[39m
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m
[90m at internal/main/run_main_module.js:17:47[39m {
code: [32m'MODULE_NOT_FOUND'[39m,
requireStack: []
}

If anyone could help me out i'd be very thankful.
 
Hello Welcome to Code Forum!

First, please remember to use the BBCode so your code can be easily read and copied you can do this by clicking (...) in editor and select Code.

have you moved any files?
 
Well for starters .js files are for javascript which is something completely separate from Java. Also make sure you have Java installed on your computer. It may not be running because you named the extension .js instead of the proper Java extension. Also you may need to go to java.com and download Java. Java won't work unless you have it installed. It's kind of like how you need a local environment for PHP but a bit different as all you need to do is download the Java Runtime Environment (JRE) package.
 
A first google of your error points me in the direction of a node / js environment rather than a Java one.

Can you tell us what you're trying to achieve? What did you run to cause this? What have you tried to fix?

If it *is* a js project (which I suspect is the case), I'd suggest removing your node_modules dir and try re-installing with npm install.
 
Hello i've recently started learning java. I'm still a newbie and i couldn't find any solution to this error i keep getting when i try to run my program

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

Error: Cannot find module 'C:\Users\shrmm\Desktop\Bot\project1.js'
[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:835:27)[39m
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m
[90m at internal/main/run_main_module.js:17:47[39m {
code: [32m'MODULE_NOT_FOUND'[39m,
requireStack: []
}

If anyone could help me out i'd be very thankful.
Do you still need help with this?
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom