Whats the problem ??? I'm working on a bot for discord using JavaScript when executing my files in VS code it works normally but in Repl.it it shows me this error
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/Bot/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.<anonymous> (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/Bot/index.js'
}
Related
Error message:
[nodemon] starting `babel-node index.js`
C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328
throw e;
^
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of #babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "#babel/core" or "babel-core" to see what is calling Babel. (While processing preset: "C:\\Users\\Zara Gunner\\FYP\\fourthyearproject\\fourthyearproject\\node_modules\\#babel\\preset-env\\lib\\index.js")
at throwVersionError (C:\Users\Zara Gunner\FYP\fourthyearproject\fourthyearproject\node_modules\#babel\helper-plugin-utils\lib\index.js:78:11) at Object.assertVersion (C:\Users\Zara Gunner\FYP\fourthyearproject\fourthyearproject\node_modules\#babel\helper-plugin-utils\lib\index.js:28:5)
at C:\Users\Zara Gunner\FYP\fourthyearproject\fourthyearproject\node_modules\#babel\preset-env\lib\index.js:251:7
at C:\Users\Zara Gunner\FYP\fourthyearproject\fourthyearproject\node_modules\#babel\helper-plugin-utils\lib\index.js:22:12
at C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:317:46
at Array.map (<anonymous>)
at OptionManager.resolvePresets (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20)
at OptionManager.mergePresets (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10)
at OptionManager.mergeOptions (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14)
at OptionManager.init (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12)
at compile (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-register\lib\node.js:103:45)
at loader (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-register\lib\node.js:144:14)
at Object.require.extensions.<computed> [as .js] (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\node_modules\babel-register\lib\node.js:154:7)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at Object.<anonymous> (C:\Users\Zara Gunner\AppData\Roaming\npm\node_modules\babel-cli\lib\_babel-node.js:154:22)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'BABEL_VERSION_UNSUPPORTED',
version: '6.26.3',
range: '^7.0.0-0'
}
So i was working on a login system with MySql. At first it worked perfectly, but after a bit of time it stopped working and now when I start it it gives me
Error: connect ETIMEDOUT
at Connection._handleConnectTimeout (I:\Websites\backend\node_modules\mysql\lib\Connection.js:409:13)
at Object.onceWrapper (events.js:519:28)
at Socket.emit (events.js:400:28)
at Socket._onTimeout (net.js:484:8)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
--------------------
at Protocol._enqueue (I:\Websites\backend\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Protocol.handshake (I:\Websites\backend\node_modules\mysql\lib\protocol\Protocol.js:51:23)
at Connection.connect (I:\Websites\backend\node_modules\mysql\lib\Connection.js:116:18)
at Object.<anonymous> (I:\Websites\backend\Main.js:20:4)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
errorno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
fatal: true
}
What is also important to say is that I do not host the Database on my PC, I have rented a server for it. Hope that someone can help
I am facing issue to run the JavaScript file in VS code.
I am getting the output as:-
[Running] node "e:\n\Temporay folders of web development\vs code project\tut64.js"
node:internal/fs/utils:343
throw err;
^
Error: ENOENT: no such file or directory, open 'tut64.txt'
at Object.openSync (node:fs:582:3)
at Object.readFileSync (node:fs:450:35)
at Object.<anonymous> (e:\n\Temporay folders of web development\vs code project\tut64.js:2:17)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'tut64.txt'
}
[Done] exited with code=1 in 0.839 seconds
And in the terminal I am getting:-
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS E:\n\Temporay folders of web development\vs code project> node \tut64.js\
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'E:\tut64.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I am not getting what type of these errors are and why I am getting them.
In the terminal you should do node tut64.js
And check the path of tut64.txt or post your code.
When I start my discord bot I get an error on the console:
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module 'discord.js'
Require stack:
- /home/container/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/container/index.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/container/index.js' ]
}
But if there is an "index.js"
You need to install discord.js, in your console type npm install discord.js
I'm trying to run node app server.js with the imported code from GitHub but getting below error in the console. Not sure why I'm getting this error.
Error :util.js:959 Object.setPrototypeOf(ctor.prototype, superCtor.prototype);
TypeError: Object.setPrototypeOf called on null or undefined
at Function.setPrototypeOf (native)
at Object.exports.inherits (util.js:959:10)
at Object.<anonymous> (businessvalidationexception.js:1:17)
at Module._compile (module.js:541:32)
at loader (/home/vagrant/Desktop/..../node_modules/babel-core/node_modules/babel-register/lib/node.js:126:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/vagrant/Desktop/..../node_modules/babel-core/node_modules/babel-register/lib/node.js:136:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)