- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2022 06:51 PM
I'm trying to get set up to build a custom component for UI Builder, however when running the scaffolded component I get the error message below in the browser console. If I added buttons or checkmarks into the view (in index.js), they render in the browser but are not clickable. This same behavior happens on two different machines, so I must be doing something wrong.
Uncaught ReferenceError: process is not defined
at Object.4043 (<anonymous>:2:13168)
at r (<anonymous>:2:306599)
at Object.8048 (<anonymous>:2:9496)
at r (<anonymous>:2:306599)
at Object.8641 (<anonymous>:2:1379)
at r (<anonymous>:2:306599)
at <anonymous>:2:315627
at <anonymous>:2:324225
at <anonymous>:2:324229
at HTMLIFrameElement.e.onload (index.js:1:371098)
4043 @ VM70:2
r @ VM70:2
8048 @ VM70:2
r @ VM70:2
8641 @ VM70:2
r @ VM70:2
(anonymous) @ VM70:2
(anonymous) @ VM70:2
(anonymous) @ VM70:2
e.onload @ index.js:1
be @ index.js:1
he @ index.js:1
onmessage @ entry-devserver.js:38
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:51
(anonymous) @ main.js:282
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:280
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:50
WebSocketTransport.ws.onmessage @ websocket.js:35
load (async)
be @ index.js:1
he @ index.js:1
onmessage @ entry-devserver.js:38
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:51
(anonymous) @ main.js:282
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/main.js.SockJS._transportMessage @ main.js:280
../node_modules/error-overlay-webpack-plugin/node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @ emitter.js:50
WebSocketTransport.ws.onmessage @ websocket.js:35
Here are the steps I took:
- Install NodeJS 12.16.1
- NPM 6.13.4 seems to install with NodeJS
- Install the Now CLI from the store (the links to the Innovation lab on this page no longer work for me).
- Install the UI-Component extension (snc extension add --name ui-component)
- Set up a default profile to my instance (snc configure profile set)
- Create a new folder on my local machine
- Scaffold a new component (snc ui-component project --name @myorg/hello-world --scope x_myorg_helloworld --offline)
- Run npm install in the folder to install all the dependencies. I do get a bunch of warnings about deprecated modules
- Start the dev server by running snc ui-component develop.
- Even without adding anything to the scaffolded component I get the error. If I add a simple html button it is not clickable.
Here are the last lines of the result of npm install:
added 3197 packages from 2201 contributors and audited 3200 packages in 398.173s
90 packages are looking for funding
run `npm fund` for details
found 780 vulnerabilities (45 low, 383 moderate, 310 high, 42 critical)
run `npm audit fix` to fix them, or `npm audit` for details
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 12:47 PM
This post solved my problem
https://community.servicenow.com/community?id=community_question&sys_id=e0fa505edb8dcd50e515c2230596194e
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 12:47 PM
This post solved my problem
https://community.servicenow.com/community?id=community_question&sys_id=e0fa505edb8dcd50e515c2230596194e