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

DirkRedeker
Mega Sage

Hi

I had a similar issue, when I installed on a fresh Windows 10 machine.

After testing and trying a lot, I thought what was different to my old installation.

Then, I came up, that GIT was not yet installed.

So, I installed GIT and REINSTALLED NODE + NPM and NOW-CLI

Then, everything worked fine.

 

Also have a look at my articles on the NOW UI Experience:

Article #11 - Fast Track to your first "Now Experience UI Framework Component"

 

Give that a shot and let me know.

Let me know if that answers your question and mark my answer as correct and helpful.

BR

Dirk

 

Hi Dirk,

 

Thanks for your response.

I have reinstall npm and node. but still, I am facing the same issue.

 

Thanks

Hi

Did you Install "GIT" then as well?

https://git-scm.com/download

THAT was the solving point for me!

BR

Dirk

Hi Dirk,

 

I have installed GIT also but still issue not resolved

 

Thanks

Ramesh R