relay icon indicating copy to clipboard operation
relay copied to clipboard

Can't get examples to work

Open nareshbhatia opened this issue 10 years ago • 12 comments

I am seeing several issues that say examples don't work. However they are either closed or referencing each other with no definitive answers. Here's my attempt at the latest code base.

cd examples/todo
npm install

This gives the following error:

Error: Cannot find module 'babel-core'

Ok, so I install babel-core locally:

npm install babel-core

Now try npm install again and I get the same error.

Can someone please change the README with even a temporary workaround? It's really frustrating that I cannot even start learning the framework.

P.S. I have [email protected] and [email protected] installed globally.

nareshbhatia avatar Apr 26 '16 04:04 nareshbhatia

Yeah I can't get npm install to succeed from anywhere.

stubailo avatar Apr 26 '16 05:04 stubailo

It's definitely frustrating that the examples keep breaking. We try to test that they still work with each release, but we've found that the non-deterministic nature of NPM installs can cause things to break in hard-to-reproduce ways (for example, I can blow away my node_modules folder(s) and get a different result from you depending on when I ran npm install and in what order).

One thing I'd like to do is partly control this chaos in two ways:

  • Cut the number of examples in the repo to one (the todo), move the other examples into a separate, community-supported "unofficial" repo.
  • Use npm shrinkwrap in the examples to peg them and all of their dependencies to released versions.

This latter point would mean that you could use the examples to test master without some manual set-up (for example, you might have to blow away the npm-shrinkwrap.json file and possible set up links with npm link), but at least it would mean the chances of getting a working result after a from-scratch npm install would be much greater.

Would anybody be interested in working on this? (I don't think this is something I can get to myself over the next week or two, as I am very focused on mutations work right now.)

wincent avatar Apr 26 '16 13:04 wincent

Just a quick update: @steveluscher has done a fair bit of work over the last few days upgrading dependencies (of particular significance, moving ~~6-to-5~~ Babel from 5 to 6), so we'll probably cut a new release soon with that work, and that would be a good time to revisit this question of having verifying that everything works out of the box.

wincent avatar May 04 '16 22:05 wincent

Any update on this?

nareshbhatia avatar May 11 '16 00:05 nareshbhatia

@steveluscher is upgrading a bunch of stuff in #1118 and #1119, which means we'll be able to do a release soon. I don't think there is much point in trying to make things work until (one of?) those have landed. But at that point, I think it would be great to do some of the things I mentioned in my comment above.

wincent avatar May 11 '16 00:05 wincent

Awesome! Thanks for the update @wincent.

nareshbhatia avatar May 11 '16 01:05 nareshbhatia

Any updates? I see that both #1118 and #1119 are closed, but I have not seen a new release.

nareshbhatia avatar May 25 '16 18:05 nareshbhatia

The same with todoMVC

Dielz98 avatar May 25 '16 19:05 Dielz98

Yes, even the todoMVC doesn't work anymore.

BilalBudhani avatar May 25 '16 20:05 BilalBudhani

New release is likely to happen this week. We'll check that all the examples work, but there are lots of local-system variables, tooling version issues, and ordering issues that may mean that they don't work in specific circumstances, so once the release is out we'll be grateful for any reports of specific issues (and ideally fixes for those issues, because we may not be able to repro them).

In the meantime, duplicate reports of things not working won't really help resolve things.

@sampepose: do you think we should do the things I mentioned above (using shrinkwrap and cutting the number of examples down to one) before or after we cut the release?

wincent avatar May 25 '16 21:05 wincent

I cleaned up the examples for the release of 0.9.0. Give them a try!

steveluscher avatar May 27 '16 06:05 steveluscher

We're in the middle of a little bit of a revert/unrevert situation, so if anyone wants to try the examples in the next 24 hours or so be sure to check out the v0.9.0 tag:

git clone [email protected]:facebook/relay.git
cd relay
git checkout tags/v0.9.0

steveluscher avatar May 27 '16 11:05 steveluscher