I'm getting this error:
I tried to install Npm again, if anyone comes across I would be happy to help
node:internal/modules/cjs/loader:936
throw err;
^
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\yehon\\OneDrive\\שולחן העבודה\\yehonatan\\Work_projects\\Manhattan-client-13-03-2022_v2\\config\\paths.js',
'C:\\Users\\yehon\\OneDrive\\שולחן העבודה\\yehonatan\\Work_projects\\Manhattan-client-13-03-2022_v2\\config\\env.js',
'C:\\Users\\yehon\\OneDrive\\שולחן העבודה\\yehonatan\\Work_projects\\Manhattan-client-13-03-2022_v2\\scripts\\start.js'
]
}
Related
````your text ERROR in ./app/app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
C:\Users\Projects\Multipayment\sample-browser-ui\src\node_modules\babel-plugin-twin\index.js:15
const matchedExclude = (state.opts.exclude ?? []).find((regex) =>
SyntaxError: Unexpected token '?'
at Module._compile (internal/modules/cjs/loader.js:895:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at requireModule (C:\Users\Projects\Multipayment\sample-browser-ui\src\node_modules\#babel\core\lib\config\files\plugins.js:165:12)
at loadPlugin (C:\Users\Projects\Multipayment\sample-browser-ui\src\node_modules\#babel\core\lib\config\files\plugins.js:68:17)
at createDescriptor (C:\Users\Projects\Multipayment\sample-browser-ui\src\node_modules\#babel\core\lib\config\config-descriptors.js:154:9)
at C:\Users\Projects\Multipayment\sample-browser-ui\src\node_modules\#babel\core\lib\config\config-descriptors.js:109:50
# multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true react-hot-loader/patch ./app/app.js main[3]
Getting error on npm start `
i have some Problems with my Code that somehow none of my friends have ...
Some Code to see:
module.exports = {
data: new SlashCommandBuilder()
.setName('equipment')
.setDescription('Gives you Information about specific Equipments')
.addStringOption(option =>
option.setName('type')
.setDescription('Specify the Equipment')
.setRequired(true)
.addChoice('Flashlight', 'flashlight')
),
...
The Code is Cut here because its not necesery for it above to work.
My Error Code:
PS C:\Users\enric\Desktop\Ghosty Phasmo Help> node .
C:\Users\enric\Desktop\Ghosty Phasmo Help\commands\phasmo\equipment.js:15
.addChoice('Flashlight', 'flashlight')
^
TypeError: option.setName(...).setDescription(...).setRequired(...).addChoice is not a function
at C:\Users\enric\Desktop\Ghosty Phasmo Help\commands\phasmo\equipment.js:15:18
at MixedClass._sharedAddOptionMethod (C:\Users\enric\Desktop\Ghosty Phasmo Help\node_modules\#discordjs\builders\dist\index.js:1334:50)
at MixedClass.addStringOption (C:\Users\enric\Desktop\Ghosty Phasmo Help\node_modules\#discordjs\builders\dist\index.js:1323:17)
at Object.<anonymous> (C:\Users\enric\Desktop\Ghosty Phasmo Help\commands\phasmo\equipment.js:11:7)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
Somehow my Discord.js thinks that im using a Function. I copied the Code from other friends where this completely work. but somehow the same Error message appears.
.addChoice() is outdated. Now, there is only .addChoices() (with an s)
.addStringOption(option =>
option.setName('type')
.setDescription('Specify the Equipment')
.setRequired(true)
.addChoices({
name: 'Flashlight',
value: 'flashlight'
})
)
Im trying to make a discord music bot and i have to admit that i dont have much knowledge on javascript so im just following a tutorial. Now this is the code he wrote
const slashFiles = fs.readdirSync("./slash").filter(file => file.endsWith(".js"))
for (const file of slashFiles){
const slashcmd = require(`./slash/${file}`)
client.toLocaleLowerCase.set(slashcmd.data.name, slashcmd)
if (LOAD_SLASH) commands.push(slashcmd.data.toJSON())
}
and thats the error im getting
client.toLocaleLowerCase.set(slashcmd.data.name, slashcmd)
^
TypeError: Cannot read properties of undefined (reading 'set')
at Object.<anonymous> (C:\Users\stelj\Desktop\bot\main.js:31:30)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157: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
Pls help
C:\Users\bahub\Documents\React-Projects\contact-manager-app>npm start
contact-manager-app#0.1.0 start
react-scripts start
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'isexe'
Require stack:
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\which\which.js
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\lib\util\resolveCommand.js
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\lib\parse.js
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\index.js
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\react-dev-utils\crossSpawn.js
C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\react-scripts\bin\react-scripts.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\which\which.js:10:13)
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 Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\which\which.js',
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\lib\util\resolveCommand.js',
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\lib\parse.js',
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\cross-spawn\index.js',
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\react-dev-utils\crossSpawn.js',
'C:\Users\bahub\Documents\React-Projects\contact-manager-app\node_modules\react-scripts\bin\react-scripts.js'
]
}
i'm trying to install react-router-sitemap in my application but when i run the command "node sitemap-generator.js" (after the configuration) this message on my console came out:
internal/modules/cjs/loader.js:960
throw err;
^
Error: Cannot find module '/home/ricardo/xxxx/sitemap-generator.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
in the installation i've created a file called "sitemap-builder.js" (within src):
require('babel-register');
const router = require('../src/router/routes').default;
const Sitemap = require('./').default;
function generateSitemap() {
return (
new Sitemap(router())
.build("https://www.web.com")
//Save it wherever you want
.save("../public/sitemap.xml")
);
}
generateSitemap();