soonlive / relay-cart

A simple shopping cart example leveraging relay & GraphQL with routing and pagination.
18 stars 5 forks source link

Getting error on npm start #1

Open alexhawkins opened 8 years ago

alexhawkins commented 8 years ago

Awesome demo but I'm unable to get it running locally. I get the error below. Any insights?

ERROR in ./js/app.js
Module build failed: ReferenceError: Unknown plugin "./build/babelRelayPlugin" specified in "base" at 0, attempted to resolve relative to "/Users/hawk/Documents/onehope/relay-cart/js"
soonlive commented 8 years ago

It seems the babelRelayPlugin isn't compatible with babel 6.6.x currently. Switch to babel 6.5.2 may make it work.

npm install babel-core@6.5.2
npm start
soonlive commented 8 years ago

Well, interest driven. I'm willing to program and share. As you can see, I'm not good at english. When learning RGR I was puzzled about mutation and fragment. It takes me several days to find out the answer. So I hope this sample could be help for someone who is also learning RGP.

Sorry to confuse you about the async. It could be use in the case such as fetching data by invoke restful api. But it's useless in this sample. I would appreciate if you make a pull request :)

BigBuckBunny commented 8 years ago

Found a fix with the latest versions of babel, resolved my problem;

plugins: ['./js/babelRelayPlugin'].map(require.resolve)

https://github.com/webpack/webpack/issues/1866

Thanks for posting your work, it gave me some ideas, but now I have to re-write stuff so maybe I should not 'Thank you'.

Have a good one

andevsoftware commented 8 years ago

@BigBuckBunny Thanks, that works!

daisy-github commented 7 years ago

Awesome demo but I'm unable to get it running

soonlive commented 7 years ago

@daisy-github Could you please try it again? I updated some codes just now.