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

Here's my package.json:

{
	"name": "@dtt/hello-world",
	"version": "0.0.1",
	"private": false,
	"description": "'Hello",
	"keywords": [
		"ServiceNow",
		"Now Experience UI Component",
		"@dtt/hello-world"
	],
	"readme": "./README.md",
	"engines": {
		"node": ">=8.6.0",
		"npm": ">=5.3.0"
	},
	"module": "src/index.js",
	"dependencies": {
		"@servicenow/ui-core": "orlando",
		"@servicenow/ui-renderer-snabbdom": "orlando",
		"@servicenow/cli-archetype": "17.0.3",
		"@servicenow/cli-component-archetype": "17.0.3",
		"@servicenow/sass-theme": "orlando",
		"@servicenow/sass-kit": "orlando",
		"@servicenow/library-translate": "orlando"
	},
	"devDependencies": {
		"@servicenow/cli-archetype-dev": "17.0.3",
		"@servicenow/cli-component-archetype-dev": "17.0.3"
	}
}

This 'Hello World' is created by me, I didn't download it anywhere. I will try to set the version as 17.0.1 and try again

Hi I think it will not help to set to 17.0.1. If it is just a jump start, there may be no super special in it. So, if you like, you can zip the folder and upload here. It the file size is not too large. Let's keep on investigating. I am also interested in knowing the reason for the error. BR Dirk

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

Great

Thanks for letting me know, that you were able to sort out.

So, it looked like a local config issue on your machine, and nothing related to the CLI directly, right? Well done!

Have fun creating components.

BR

Dirk

Community Alums
Not applicable

Thanks a lot, this worked.