Getting error "internal/modules/cjs/loader.js:883"when running the now-cli -develop

ramesh_r
Mega Sage

Hi All,

 

I am trying to develop the comment from my location machine for that i have to install the nmp and now cli in my location machine but then I am running the below code I am getting the below error.

 

Command: now-cli develop

Error : 

C:\SnowDoctor>now-cli develop
Running component locally...
internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module 'C:\SnowDoctor\node_modules\@servicenow\cli-component-archetype-dev\conf\develop\pre\run'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}
[builder:builder-core:end:4768] Task: run develop:pre, Error: Command failed: cmd /d /s /c node node_modules/@servicenow/cli-component-archetype-dev/conf/develop/pre/run

[builder:builder-core:end:10612] Task: run develop:trace, Error: Command failed: cmd /d /s /c builder run develop:pre

 

 

Thanks

Ramesh R

8 REPLIES 8

HI

OK, thanks for that update.

Can you please check, if you have the following file (see screenshot):

yours should be in the folder:

C:\SnowDoctor\node_modules\@servicenow\cli-component-archetype-dev\conf\develop\pre

 

find_real_file.png

Just let me know, if that file exists on your machine?

BR

Dirk

 

Hi Dirk.

No the 'cli-component-archetype-dev' folder is not exist. can you help me how to bring this folder

 

 

find_real_file.png

 

Thanks

Ramesh R

 

Hi

That is interesting.

I do not know all the dependencies yet, but I am trying to find out the root cause.

As said, I had similar issues, and installed the following Software AGAIN in the following order:

> GIT

> NODE with NPM

> NOW-CLI

AFTER THAT, I created a "brand-new" project and called the "npm install" after doing the scaffolding.

That finally solved my issue, so something with these dependencies sorted this out.

Maybe (I know, this may be annoying, but maybe it also solves your issue) you can try this in THAT order (WITH a NEW Project please) on your machine.

I hope this will help also on your computer.

 

I am very interested in learning about the dependencies, existing.

Good luck!

Please let me know, if that gave some success.

 

BR

Dirk

Community Alums
Not applicable

Did anyone found the root cause?