Not able to install forge

C:\Users\AWale\AppData\Roaming\npm>forge --version
node:internal/modules/cjs/loader:1404
throw err;
^

Error: Cannot find module ‘C:\Users\AWale\AppData\Roaming\npm\node_modules@forge\cli\out\bin\cli.js’
at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {
code: ‘MODULE_NOT_FOUND’,
requireStack:
}

Node.js v22.16.0

Please help me asap.

Hi @AnilWalecw

Sorry to hear you’re having a problem here.

This could be an issue with node. Did you install node for the first time to get Forge installed? or have you been using it successfully on your machine already?

Cheers!
Mel

Hi @AnilWalecw

Looks like the error is possibly caused by an incorrect module path — it’s missing a backslash before @forge:

Incorrect:

`C:\Users\AWale\AppData\Roaming\npm\node_modules@forge\cli\out\bin\cli.js`

Correct:

`C:\Users\AWale\AppData\Roaming\npm\node_modules\@forge\cli\out\bin\cli.js`

This could be why Node.js is unable to find the file, resulting in a MODULE_NOT_FOUND error.

I’m on Linux, so I’m not sure why this happens — just noticed the path looked wrong.

1 Like