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

Problem trying to consume the library from Gatsby #61

Closed
Kikobeats opened this issue Feb 21, 2018 · 2 comments
Closed

Problem trying to consume the library from Gatsby #61

Kikobeats opened this issue Feb 21, 2018 · 2 comments

Comments

@Kikobeats
Copy link

Hey guys, I'm trying to use react-live with gastby.

When I run the build process, a weird error appears related with buble dependency.

This is the verbose log:

  Error: ./~/buble/dist/buble.deps.js
  Module parse failed: /Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/buble/dist/buble.deps.js Unexpected token (5:0)
  You may need an appropriate loader to handle this file type.
  SyntaxError: Unexpected token (5:0)
      at Parser.pp$4.raise (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:2221:15)
      at Parser.pp.unexpected (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:603:10)
      at Parser.pp$3.parseExprAtom (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1822:12)
      at Parser.pp$3.parseExprSubscripts (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1715:21)
      at Parser.pp$3.parseMaybeUnary (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1692:19)
      at Parser.pp$3.parseExprOps (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1637:21)
      at Parser.pp$3.parseMaybeConditional (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1620:21)
      at Parser.pp$3.parseMaybeAssign (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1597:21)
      at Parser.pp$3.parseExpression (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:1573:21)
      at Parser.pp$1.parseStatement (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:727:47)
      at Parser.pp$1.parseTopLevel (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:638:25)
      at Parser.parse (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:516:17)
      at Object.parse (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/acorn/dist/acorn.js:3098:39)
      at Parser.parse (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/webpack/lib/Parser.js:902:15)
      at NormalModule.<anonymous> (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/webpack/lib/NormalModule.js:104:16)
      at NormalModule.onModuleBuild (/Users/josefranciscoverdugambin/Projects/microlink/microlink-www/node_modules/webpack/node_modules/webpack-core/lib/Norma  lModuleMixin.js:310:10)
   @ ./~/react-live/lib/utils/transpile/transform.js 6:13-45

The error says You may need an appropriate loader to handle this file type. I think this is related with dep.js prefix of the file.

gatsby needs to consume ES5 javascript. Looks like you are transpiling your code using rollup, but not sure if this code is totally compatible.

Any tip for resolve that is welcome!

@Kikobeats
Copy link
Author

Oh, a simple wait to reproduce this is:

git clone -b update git@github.com:microlinkhq/www.git
npm install && npm run build

@kitten
Copy link
Contributor

kitten commented Feb 28, 2018

In a newer version of buble they've changed their bundles and paths. This should be fixed in the latest release: https://github.com/FormidableLabs/react-live/releases/tag/v1.10.1

@kitten kitten closed this as completed Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants