Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

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

That Works. Thanks