cancel
Showing results for 
Search instead for 
Did you mean: 

Failed get-data-model

wolfphantom
8 - Cloud Apps
8 - Cloud Apps

I am attempting to set-up a PoC using the Vue components.

While working thru the documentation and running "npx @sisense/sdk-cli get-data-model" I get a thrown error

node:internal/errors:484
ErrorCaptureStackTrace(err);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'react' imported from ...

 

I can't really move forward without resolving this error.

7 REPLIES 7

nathaniel
Sisense Team Member
Sisense Team Member

Are you on Node version 16 or higher? I was only able to reproduce this with Node version 14.

Our quickstart guide mentions only supporting Node 16 and higher, https://sisense.dev/guides/sdk/quickstart.html#prerequisites

wolfphantom
8 - Cloud Apps
8 - Cloud Apps

Currently running Node v18.12.1

wolfphantom
8 - Cloud Apps
8 - Cloud Apps

I switched to Node v20, and ran it with `@lateset` which got me further.

I was prompted for a password for the username I provided; however, my account is currently signed-in with SSO so I don't have a unique password for the url. How would I resolve that?

wolfphantom
8 - Cloud Apps
8 - Cloud Apps

I think I've made progress. Not throwing a react error, and appears to accept my credentials (both u/p or token). However...

Logging in... 
OK!

Getting fields...
Error fetching metadata. Reason: Error: [request-error] Token authentication was not successful. Check credentials.

is the result of running: 

npx @sisense/sdk-cli@latest get-data-model --token xxx --output src/model.ts --dataSource "Executive Model" --url xxx 

I could use some clarity if my "dataSource" is the correct name/target, and if that failure is more about account permission-level for the data source, or is something else going on?

tuanpham
Sisense Team Member
Sisense Team Member

Hello @wolfphantom,

Can you make sure your user account has at least "Can Use" permission on the "Executive Model" data model? When you log into Sisense, do you see the data model in the Data tab?  

I've changed accounts I'm using. the previous one was an SSO account that couldn't authenticate. The new one isn't, and has been elevated to an "admin" so I can see everything.

Also as a note, I was running Node v18.12.1 and it was failing with that "react" message. I switched to Node v20.10.0 and that error message went away.

Lastly, I recommend you updated your directions when using npx to include @latest to avoid strange cacheing issues.

tuanpham
Sisense Team Member
Sisense Team Member

Lastly, I recommend you updated your directions when using npx to include @latest to avoid strange cacheing issues.

Thanks for the suggestion @wolfphantom. We have updated our guides to include @latest in the npx commands