We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Cannot import UiPage from @servicenow/sdk/core

Tobias Persson_
Tera Expert

Hi,

when I write this in my ServiceNow IDE:

import { UiPage } from '@servicenow/sdk/core'

 I get this error:

Module '"@servicenow/sdk/core"' has no exported member 'UiPage'. ts (2305)

 

But according to the docs this is the way to write UiPages in fluent. What am I missing?

 

Thanks and regards,
Tobias

1 REPLY 1

Daniel Macias
Tera Contributor

I ran into something similar while using the ServiceNow IDE. When looking through the node modules / installed dependencies, I noticed that the UiPages types weren't resolving correctly in TypeScript — it may be an issue with the Snow IDE not properly resolving the SDK packages.

 

What worked for me was creating a custom app locally using the ServiceNow SDK CLI, where the packages resolved as expected, and then deploying the app to my instance!

 

More details here: https://www.servicenow.com/docs/r/application-development/servicenow-sdk/create-application-now-sdk....

 

Hope this helped!