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 build from 1.1.0 tarball on Arch Linux - Uncaught ReferenceError: __webpack_exports__ is not defined #1418

Closed
2 tasks done
aabmass opened this issue Jan 16, 2017 · 7 comments

Comments

@aabmass
Copy link

aabmass commented Jan 16, 2017

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate
  • Arch Linux:

  • 1.1.0 release:

  • The issue is reproducible in vanilla Hyper.app:

Issue

I made the Arch Linux AUR package for hyper. I noticed it stopped working after a rebuild, nothing opens. So I followed the dev instructions and tried debugging a bit. I did

  • Downloaded 1.1.0 tarball

  • Extracted it and went into directory

  • npm install

  • npm run dev

  • In a separate terminal, npm run app

    The electron window opens with nothing showing. I opened the electron dev tools and the console shows:

    Uncaught ReferenceError: __webpack_exports__ is not defined                  bundle.js:2286
    total init time 120.87000000000006
    

The funny thing is, if I use yarn install instead of npm install, everything works.

Any ideas on what's causing this? I would guess its a Linux specific issue with the build setup.

@sergeysova
Copy link

I have too problem on ubuntu 16.04

@micopc
Copy link
Contributor

micopc commented Jan 18, 2017

Having the same issues on macOS Sierra

@srimajji
Copy link

Windows 10 as well. Fortunately yarn install works :)

@aabmass
Copy link
Author

aabmass commented Jan 18, 2017

After doing a little research, the package.json asks for ^webpack@2.2.0-rc.3 and npm actually installed ├─┬ webpack@2.2.0-rc.7 yesterday, as you can see from the npm output above. I tried again today and npm decided to resolve a different version, ├─┬ webpack@2.2.0 and it still does not work. Yarn, however, chose version webpack@^2.2.0-rc.3 and it worked fine.

To fix this with npm, from a clean copy of 1.1.0, I explicitly installed the right version after the initial install and the bundle works fine.

npm install
# waiting...
npm install webpack@2.2.0-rc.3

And it confirms it installed the rc.3

└─┬ webpack@2.2.0-rc.3 
  ├─┬ enhanced-resolve@3.0.3
  │ └── memory-fs@0.4.1 
  └── memory-fs@0.3.0 

Then I am able to run the app and it works fine. Can anyone confirm that explicitly installing webpack@2.2.0-rc.3 with npm fixes this for you, too?

@aabmass
Copy link
Author

aabmass commented Jan 18, 2017

Also, I'm running npm version 4.1.1.

@aabmass
Copy link
Author

aabmass commented Jan 19, 2017

Alright, I see the real issue is webpack/webpack#3980 and is caused by LazyParseWebpackPlugin. Removing that plugin from the webpack config altogether fixes the problem. From the webpack issue:

This is caused by the LazyParseWebpackPlugin. It's not compatible. But as it's now enabled by default you don't need it anymore.
cc @TheLarkInn

So either completely removing LazyParseWebpackPlugin or forcing webpack@2.2.0-rc.3 would solve this for now.

@matheuss
Copy link
Member

Thank you @aabmass – fixed!

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

5 participants