VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.88k forks source link

Invariant Violation - Could not find "client" in the context... #2584

Closed Kellokes closed 4 years ago

Kellokes commented 4 years ago

Hi all,

I tried several times to solve this problem, but found no solution.

I downloaded the latest version 1.15.0 of Vulcan via Git Clone and ran npm install, npm start on the terminal and the error Invariant Violation appeared for me.

Captura de Tela 2020-06-08 às 13 48 47

I saw this problem here (https://github.com/apollographql/react-apollo/issues/3381), but I didn't understand how I can solve it.

ErikDakoda commented 4 years ago

The Vulcan repo is not meant to be run on its own - its a library of packages providing functionality for building web apps - but not a web app in itself.

What you want to do is check out and run the Vulcan-Starter repo (https://github.com/VulcanJS/Vulcan-Starter), which contains several sample web apps. Here are the instructions:

https://docs.vulcanjs.org/index.html#Install

Then for contributing you can set up the Two-Repo Install:

https://docs.vulcanjs.org/index.html#Two-Repo-Install-Optional

Kellokes commented 4 years ago

Hi Erik,

Thanks to help me with my doubt. I did this steps of Vucaln-Start, but now I want to create my own app and I don´t know how I can remove the samples of Vulcan-Starter.

I thought that clone the latest version of vulcan.js repo I would be able to build an application from scratch and the error that I found trying to do this, seemed to me to be something that other people were experiencing as well.

By the way what the difference between common install and two repo Install?

Tks again!

ErikDakoda commented 4 years ago

You need to start with a clone of Vulcan-Starter to get your own web app going.

You only need the two-repo install if you want to contribute (make changes) to Vulcan. Otherwise, Meteor will automatically use the most recent version of the Vulcan packages published to Atmosphere, which is version 1.15.1 right now. In this configuration, the Vulcan repo you downloaded is not used at all.

Kellokes commented 4 years ago

Hello Erik,

Thank you so much!

Your explanation was very enlightening, I believe it will help many Vulcan Js beginners as well.