You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/20 07:34:31 UTC

[GitHub] [superset] apurvh opened a new issue, #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

apurvh opened a new issue, #22800:
URL: https://github.com/apache/superset/issues/22800

   Trying to embed the dashboard using Superset Embedded SDK fails in react app.
   Throws module not found error - `Module not found: Error: Can't resolve '@superset-ui/switchboard'`
   
   #### How to reproduce the bug
   
   1. Create a react app with - `npx create-react-app test-superset-emebed-app`
   2. In the App.js, add - 
   `
   import { embedDashboard } from "@superset-ui/embedded-sdk";
   
   
   <div id="superset-container"></div>
    <button onClick={() => {
               console.log("Button clicked");
               const token = "your tocken";
               embedDashboard({
                 id: "1f3ebcef-**",  // given by the Superset embedding UI
                 supersetDomain: "http://**",
                 mountPoint: document.getElementById("superset-container"), // html element in which iframe render
                 fetchGuestToken: () => token,
                 dashboardUiConfig: { hideTitle: true }
               });}}>
   Click me
   </button>
   
   `    
   
   ### Expected results
   
   Embedded dashboard
   
   ### Actual results
   
   Failed to compile.
   
   `
   Module not found: Error: Can't resolve '@superset-ui/switchboard' in '/Users/apurva/Dev/test-react-app/node_modules/@superset-ui/embedded-sdk/lib'
   ERROR in ./node_modules/@superset-ui/embedded-sdk/lib/index.js 8:19-54
   Module not found: Error: Can't resolve '@superset-ui/switchboard' in '/Users/apurva/Dev/test-react-app/node_modules/@superset-ui/embedded-sdk/lib'
   
   webpack compiled with 1 error
   `
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: chrome (latest)
   - superset version: ` "@superset-ui/embedded-sdk": "^0.1.0-alpha.8"`
   - python version: ``
   - node.js version: `v19.4.0`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   This pertains to Superset Embedded SDK
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1398874409

   This issue is springing up all over the place:
   
   https://github.com/apache/superset/issues/22800
   https://github.com/apache/superset/issues/22754
   https://github.com/apache/superset/issues/22747
   https://github.com/apache/superset/issues/22683
   https://github.com/apache/superset/issues/22681
   
   I'd like to close some in favor of a more centralized issue, but they each have their own peculiarities/comments worth noting. In any case, the fix will be a six-birds-with-one-stone bugfix!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1398088445

   @apurvh please post your `package.json` and `package-lock.json`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1400138976

   `@superset-ui/switchboard": "^0.18.26-2` should now be available with actual contents. Please try it out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] apurvh commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by GitBox <gi...@apache.org>.
apurvh commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1398147771

   @villebro 
   
   `package.json`
   
   ```
   {
     "name": "test-react-app",
     "version": "0.1.0",
     "private": true,
     "dependencies": {
       "@superset-ui/embedded-sdk": "^0.1.0-alpha.7",
       "@superset-ui/switchboard": "^0.18.26-1",
       "@testing-library/jest-dom": "^5.16.5",
       "@testing-library/react": "^13.4.0",
       "@testing-library/user-event": "^13.5.0",
       "react": "^18.2.0",
       "react-dom": "^18.2.0",
       "react-scripts": "5.0.1",
       "web-vitals": "^2.1.4"
     },
     "scripts": {
       "start": "react-scripts start",
       "build": "react-scripts build",
       "test": "react-scripts test",
       "eject": "react-scripts eject"
     },
     "eslintConfig": {
       "extends": [
         "react-app",
         "react-app/jest"
       ]
     },
     "browserslist": {
       "production": [
         ">0.2%",
         "not dead",
         "not op_mini all"
       ],
       "development": [
         "last 1 chrome version",
         "last 1 firefox version",
         "last 1 safari version"
       ]
     }
   }
   
   ```
   
   `package-lock.json` 
   
   ```
   {
     "name": "test-react-app",
     "version": "0.1.0",
     "lockfileVersion": 3,
     "requires": true,
     "packages": {
       "": {
         "name": "test-react-app",
         "version": "0.1.0",
         "dependencies": {
           "@superset-ui/embedded-sdk": "^0.1.0-alpha.7",
           "@superset-ui/switchboard": "^0.18.26-1",
           "@testing-library/jest-dom": "^5.16.5",
           "@testing-library/react": "^13.4.0",
           "@testing-library/user-event": "^13.5.0",
           "react": "^18.2.0",
           "react-dom": "^18.2.0",
           "react-scripts": "5.0.1",
           "web-vitals": "^2.1.4"
         }
       },
   
   ...
   
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] apurvh closed issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by "apurvh (via GitHub)" <gi...@apache.org>.
apurvh closed issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'
URL: https://github.com/apache/superset/issues/22800


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1398638130

   😱 ok let me look into what went wrong there..


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] jornetsimon commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by GitBox <gi...@apache.org>.
jornetsimon commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1398275458

   Looks like the bundle of `@superset-ui/switchboard@0.18.26-0` is empty.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] topratiksharma commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by "topratiksharma (via GitHub)" <gi...@apache.org>.
topratiksharma commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1399541061

   Use    ```"@superset-ui/switchboard": "^1.5.0" ```. 
   It should resolve the issues.
   
   The latest version of switchboard has been published empty try using the previous version.
   
   ```npm install@superset-ui/switchboard@1.5.0  --save```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #22800: embedded-sdk | Can't resolve '@superset-ui/switchboard'

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie commented on issue #22800:
URL: https://github.com/apache/superset/issues/22800#issuecomment-1399479064

   @apurvh the temperary workaround for this issue is that
   ```bash
   $ npm i --save @superset-ui/switchboard@^1.5.0
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org