Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading reactjs dependencies for cubejs #82

Closed
sameerkhan662 opened this issue Apr 17, 2019 · 13 comments
Closed

Downloading reactjs dependencies for cubejs #82

sameerkhan662 opened this issue Apr 17, 2019 · 13 comments
Labels
bug Something isn't working
Milestone

Comments

@sameerkhan662
Copy link

cubejs create hello-world -d postgres

I am using postgres for database. After starting localhost on my vm and accessing it via my host machine then some dependencies got downloaded for reactjs app(Also creating a reactjs app inside a dashboard-app folder) later I wanted to add dependencies

$ npm i --save @cubejs-client/core
$ npm i --save @cubejs-client/react

Don't know where to add in hello-world or dashboard-app?

and also after running it in both places I am getting

npm ERR! Unexpected end of JSON input while parsing near '...r\n-----END PGP SIGNA'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/navs/.npm/_logs/2019-04-17T10_26_24_301Z-debug.log
navs@kafka:~/CubeJS/hello-world$ npm i --save @cubejs-client/core
npm ERR! Unexpected end of JSON input while parsing near '...r\n-----END PGP SIGNA'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/navs/.npm/_logs/2019-04-17T10_28_53_779Z-debug.log
navs@kafka:/CubeJS/hello-world$ cd dashboard-app/
navs@kafka:
/CubeJS/hello-world/dashboard-app$ npm i --save @cubejs-client/core
npm ERR! Unexpected end of JSON input while parsing near '...r\n-----END PGP SIGNA'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/navs/.npm/_logs/2019-04-17T10_29_21_857Z-debug.log
navs@kafka:/CubeJS/hello-world/dashboard-app$ cd ..
navs@kafka:
/CubeJS/hello-world$ npm i --save @cubejs-client/core
npm ERR! Unexpected end of JSON input while parsing near '...r\n-----END PGP SIGNA'

npm ERR! A complete log of this run can be found in:
npm ERR! /home/navs/.npm/_logs/2019-04-17T10_30_37_847Z-debug.log

@paveltiunov
Copy link
Member

Hey @sameerkhan662 ! It's very interesting issue. It seems npm related. Could you please try to install any package other than cube.js?

Also these @cubejs-client dependencies should go to dashboard-app and they will be added automatically when you add chart to dashboard in Playground.

@sameerkhan662
Copy link
Author

I have run npm run dev command then I am able to see 3 tabs explore dashboard and schema when I click dashboard it starts creating react-app by downloading react modules, then only I got dashboard-app created. I don't have any idea what npm i --save @cubejs-client/core npm i --save @cubejs-client/react will do since I already have frontend code ready and dashboard is automatically created by running this command when I clicked on the tab then I why it wasn't running when I was running from my console manually? Rest I also want to address one more issue is that after I create some table in explore but when I click Add to dashboard button I see some error in dashboard
Here is the pic I am sharing with the console error visible.
https://pasteboard.co/IaQmg9M.png

@sameerkhan662
Copy link
Author

@paveltiunov I guess these automatically import is also not working and when I inspect my package.json file. I didn't find anything added

{
  "name": "dashboard-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.8.6",
    "react-dom": "^16.8.6",
    "react-scripts": "2.1.8"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
   ]
}

@sameerkhan662
Copy link
Author

@paveltiunov can you please help me with this problem?

@paveltiunov
Copy link
Member

Hey @sameerkhan662! So seems like your dashboard app is created successfully. Could you please elaborate a little bit about moment when you click add to dashboard button? What do you see in your console?

Could you please also provide your App.js from dashboard-app/src?
Thanks!

@BMAnush
Copy link

BMAnush commented Apr 24, 2019

@BMAnush
Copy link

BMAnush commented Apr 24, 2019

Issue Fixed in version 0.7.8 onwards. Thank you @paveltiunov

@sameerkhan662
Copy link
Author

@BMAnush but when this new version came?? I guess I didn't gave any version so it might have downloaded the latest one.

@BMAnush
Copy link

BMAnush commented Apr 24, 2019

@sameerkhan662 it was out few hours ago....try creating a new project and try again.

@paveltiunov paveltiunov added the bug Something isn't working label Apr 25, 2019
@paveltiunov paveltiunov added this to the v0.7.8 milestone Apr 25, 2019
@paveltiunov
Copy link
Member

Hey @sameerkhan662 ! We just recently stumbled upon these Failed to fetch issues. I'm curious are you trying to run playground on a remote server and accessing it with address other than localhost?

@sameerkhan662
Copy link
Author

@paveltiunov yes I have my cubejs on virtual machine which is hosted on my main local machine I am working therefore.....i am accessing from main machine at 10.10.51.19 after running cubejs since my vm ipaddress is 10.10.51.19.....though I have not tried since the update like @BMAnush is telling it's a bug and got resolved in latest version

@paveltiunov paveltiunov reopened this Apr 26, 2019
@paveltiunov
Copy link
Member

Hey @sameerkhan662 ! Gotcha. Yep. It doesn't work due to Mixed Content restrictions because codesandbox that renders dashboard uses HTTPS. So as a workaround you can run dashboard-app using npm run start from dashboard-app directory and access it on 3000 port by default. Could you please try and let me know if it works for you?

@paveltiunov
Copy link
Member

Hey @sameerkhan662 ! We just recently rolled out version in which dashboard runs as part of dev server and can be accessed by public IP. Could you please upgrade and check?

@paveltiunov paveltiunov modified the milestones: v0.7.8, v0.8.5 May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants