Forum Discussion

wolfphantom's avatar
wolfphantom
Cloud Apps
03-20-2024

Failed get-data-model

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

  • 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's avatar
    tuanpham
    Sisense Employee

    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?  

    • wolfphantom's avatar
      wolfphantom
      Cloud Apps

      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's avatar
    tuanpham
    Sisense Employee

    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

  • 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?