Getting Build Failed Error when trying to build react project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
I followed below article and created a react project using ServiceNow SDK but when I am trying to build the project using npm run build I am getting error shown in the attached screenshot, do anyone have any idea about why I am getting this error?
C:\SN_DSK> npm run build
> react-ui-page-ts-sample@0.0.1 build
> now-sdk build
[now-sdk] Initiating the build process ...
[now-sdk] Building project from C:\SN_DSK...
[now-sdk] Running script "prebuild" from C:/SN_DSK/now.prebuild.mjs
[now-sdk] ERROR: Build failed: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Node version : v20.18.0
Npm : 8.19.3