Error occured when using now-cli develop in the terminal

Daniel Xiong
Giga Contributor

When I prepare the environment of the new UI framework in orlando, at the step of now-cli develop, it always shows error:

Error: Cannot find module '@servicenow/cli-component-archetype/package.json'

I've installed the package in the project folder and I can find the package.json file in the node_modules:find_real_file.pngfind_real_file.png

Any help?

1 ACCEPTED SOLUTION

Dear Dirk,

I solved this problem by the following steps:

npm install -g node-gyp

npm install --global --production windows-build-tools

npm cache clean -f

npm install

npm install node-sass (manully, maybe need npm rebuild node-sass if it doesn't work)

 

Now, it works fine.

 

Thank your, Dirk!

BR

Daniel

View solution in original post

16 REPLIES 16

find_real_file.png

I got this file but another strange thing happens, when I run now-cli dev, it only show "Running component locally..." and no build logs:

find_real_file.png

 

BR

Daniel

Hi Dirk,

Here my versions:

find_real_file.png

find_real_file.png

 

BR

Daniel

Hi

Not sure, if that is an issue.

I have "node" v12.16.2 and "npm" version 6.14.4.

My CLI version is 17.0.2

BTW: Running the

> now-cli develop

TAKES some seconds to respond. Keep cool and wait some seconds (for me around 15 seconds on a Surface Book).

Let me know, if you could proceed with the updated NPM and NODE Versions.

BR

Dirk

It wait for a long time and no build logs.

BTW: can you paste the content of the "package.json" file? it must match in version as well - I guess.. For me it mentioned also Version 17.0.2. And you are running your component in 17.0.3

Maybe that mixes up something as well...

BR

Dirk

PS: Did you download your "Hello-World" somewhere, so that I can also try to find out, if that issue happens on my machine as well?

 

Let me know.
BR

Dirk