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

Can't run docz after a fresh install #416

Closed
rafaelchiti opened this issue Oct 17, 2018 · 20 comments
Closed

Can't run docz after a fresh install #416

rafaelchiti opened this issue Oct 17, 2018 · 20 comments
Labels
bug Something isn't working difficult: medium priority: high High priority issues

Comments

@rafaelchiti
Copy link

Bug Report

Getting an error when running yarn run docz dev on a fresh install (from the getting started guidelines)

To Reproduce

  1. mkdir test_project
  2. yarn add docz
  3. yarn run docz dev
  4. See error
 WARNING  Compiled with 11 warnings                                                                                                                                                                 07:18:24

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

Environment

  • OS: [OSX Mojave 10.14]
  • Node/npm version: [ Node 8.11.2 /npm 6.4.1 / yarn 1.9.4]

Additional context/Screenshots

Tried on two different computers no luck.
A previous project that I had running and configured started failing with the same error after I added a dependency. (I assume a dependency of docz changed and is causing this error?)

Thanks!!

@rafaelchiti
Copy link
Author

Downgrading the local version of buble (which is a dependency of docz) fixed the issue.

yarn add buble@0.19.4

More details here: bublejs/buble#159

@lwxyfer
Copy link

lwxyfer commented Oct 17, 2018

@rafaelchiti It just builds success. when you open in the browser, The console shows error:

Uncaught TypeError: Cannot set property 'jsx' of undefined
    at inject (webpack-internal:///./node_modules/buble/dist/buble-browser.es.js:639)
    at eval (webpack-internal:///./node_modules/buble/dist/buble-browser.es.js:9823)
    at Array.reduce (<anonymous>)
    at Module.eval (webpack-internal:///./node_modules/buble/dist/buble-browser.es.js:9822)
    at eval (webpack-internal:///./node_modules/buble/dist/buble-browser.es.js:9918)
    at Module../node_modules/buble/dist/buble-browser.es.js (vendors.js:1286)
    at __webpack_require__ (runtime~app.js:788)
    at fn (runtime~app.js:151)
    at eval (webpack-internal:///./node_modules/react-live/dist/react-live.es.js:26)
    at Module../node_modules/react-live/dist/react-live.es.js (vendors.js:5579)

@piotrfonte
Copy link
Contributor

Experiencing the same issue. Tried downgrading buble and acorn. No luck.

@actuallyReallyAlex
Copy link

Having the same problem. Also tried downgrading acorn, but did not work.

@actuallyReallyAlex
Copy link

So @rafaelchiti 's suggestion of downgrading buble to v0.19.4 worked to compile and get it running in the browser.

Downgrading the local version of buble (which is a dependency of docz) fixed the issue.

yarn add buble@0.19.4

More details here: Rich-Harris/buble#159

But it looks like this pull request is trying to fix the issue itself, not just downgrading temporarily.

@andrevenancio
Copy link

Same issue as reported. addinb buble@0.19.4 fixes docz build but still there's the JSX warning. Anyone managed to solve this another way?

@pedronauck
Copy link
Member

Hi guys, sorry the too late response, last weeks was very hard to me and I couldn't see anything about docz, but now I available again... I'll check and try to fix this 🙏

@cemusta
Copy link

cemusta commented Oct 23, 2018

This just brakes my whole trust on open source. Wanted to drop it here.

you can always fix it yourself and keep trusting it.

@actuallyReallyAlex
Copy link

actuallyReallyAlex commented Oct 23, 2018

@kucukkanat Things happen! Also you spelled “breaks” incorrectly. Maybe you just broke my entire trust in dictionaries.

@andrevenancio
Copy link

Oh no you guys made him delete his comment! Pretty funny though... Please @pedronauck restore my faith in Open Source. is this fixed yet?

@Jared-Dev
Copy link
Contributor

@pedronauck this can be closed. buble fixed their bug so this is no longer an issue again.

@theutz
Copy link

theutz commented Oct 26, 2018

I'm still experiencing the same problem. I removed buble from my dependencies and removed/re-installed node_modules. Any ideas?

 WARNING  Compiled with 11 warnings                                  09:29:59

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

 warning  in ./node_modules/buble/dist/buble-browser.es.js

"export 'default' (imported as 'require$$0') was not found in 'acorn'

@Jared-Dev
Copy link
Contributor

Try running npm cache clear --force && npm cache clean.

@Jared-Dev
Copy link
Contributor

Closing the issue. Let me know if anyone else is still having the issue after deleting their node_modules folder and clearing the package manager's cache.

@DevanB
Copy link

DevanB commented Oct 28, 2018

I've not been able to get this resolved after following these steps locally (before trying to apply them to my CI/CD pipeline):

1. rm -rf node_modules
2. npm cache clear --force
3. npm cache clean --force
4. npm install

However, it does not work when replacing npm install with yarn

@Jared-Dev
Copy link
Contributor

This project is based on yarn so that makes sense.

The two relevant commands that may need ran can be combined into npm cache clear --force && yarn cache clean

@DevanB
Copy link

DevanB commented Oct 28, 2018

Interesting. Doing these steps didn't fix it:

1. rm -rf node_modules
2. npm cache clear --force
3. yarn cache clean
4. yarn

@Jared-Dev
Copy link
Contributor

Can you look and see which version of buble got installed?

@DevanB
Copy link

DevanB commented Oct 28, 2018

A yarn why buble tells me buble@0.19.5, which isn't the latest (as of 5 days ago). But I'm also not sure how to force myself and our CI pipeline to use 0.19.6, if that is the fix.

16:02 $ yarn why buble
yarn why v1.10.1
[1/4] 🤔  Why do we have the module "buble"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "buble@0.19.5"
info Reasons this module exists
   - "docz-theme-default#react-live" depends on it
   - Hoisted from "docz-theme-default#react-live#buble"
info Disk size without dependencies: "6.28MB"
info Disk size with unique dependencies: "6.28MB"
info Disk size with transitive dependencies: "6.28MB"
info Number of shared dependencies: 17

@Jared-Dev
Copy link
Contributor

Jared-Dev commented Oct 28, 2018

Adding "buble": "^0.19.6 to your package.json should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficult: medium priority: high High priority issues
Projects
None yet
Development

No branches or pull requests

10 participants