Error while running a custom UI Component

Sravan Kumar Ka
Tera Contributor

I am trying to run the command snc ui-component develop --open --port 3000  and it returns the below error.

 

node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\babel\package.json' of 'lib/index'. Please either fix that or report it to the module author
(node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\dev-server\package.json' of 'lib/index'. Please either fix that or report it
to the module author
(node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\extract-text\package.json' of 'lib/index'. Please either fix that or report it to the module author
(node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\postcss\package.json' of 'lib/index'. Please either fix that or report it to
the module author
(node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\sass\package.json' of 'lib/index'. Please either fix that or report it to the module author
(node:21268) [DEP0128] DeprecationWarning: Invalid 'main' field in 'C:\Users\srava\NowCard\node_modules\@webpack-blocks\typescript\package.json' of 'lib/index'. Please either fix that or report it
to the module author
TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (16688)
at Object.writeFileSync (node:fs:2164:5)
at C:\Users\srava\NowCard\node_modules\@servicenow\cli-pre-post-tasks\common\tasks\dev-server.js:23:637
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
[builder:builder-core:end:1216] 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:13736] Task: run develop:trace, Error: Command failed: cmd /d /s /c builder run develop:pre

 

Please help me in resolving this error.

 

Thanks.

1 ACCEPTED SOLUTION

Harish Gentyala
ServiceNow Employee
ServiceNow Employee

Node Version 17 is still not supported, can you check with node 14?

View solution in original post

5 REPLIES 5

Sravan Kumar Ka
Tera Contributor

@Shasank Please help

Harish Gentyala
ServiceNow Employee
ServiceNow Employee

HI Sravan,
Can you share the following details:
1) Node version
2) "@servicenow/cli" package version

HI @Harish Gentyala 

Node Version v17.9.1

Snc version

{
"extensions": {
"ui-component": "23.0.0"
},
"snc": "1.1.0"
}

 

Thanks,

Sravan,

Harish Gentyala
ServiceNow Employee
ServiceNow Employee

Node Version 17 is still not supported, can you check with node 14?