hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Can't build from 1.1.0 tarball on Arch Linux - Uncaught ReferenceError: __webpack_exports__ is not defined

Open aabmass opened this issue 9 years ago • 7 comments

  • [x] I am on the latest Hyper.app version
  • [x] 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.

aabmass avatar Jan 16 '17 17:01 aabmass

I have too problem on ubuntu 16.04

sergeysova avatar Jan 17 '17 12:01 sergeysova

Having the same issues on macOS Sierra

micopc avatar Jan 18 '17 04:01 micopc

Windows 10 as well. Fortunately yarn install works :)

srimajji avatar Jan 18 '17 08:01 srimajji

After doing a little research, the package.json asks for ^[email protected] and npm actually installed ├─┬ [email protected] yesterday, as you can see from the npm output above. I tried again today and npm decided to resolve a different version, ├─┬ [email protected] 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 [email protected]

And it confirms it installed the rc.3

└─┬ [email protected] 
  ├─┬ [email protected]
  │ └── [email protected] 
  └── [email protected] 

Then I am able to run the app and it works fine. Can anyone confirm that explicitly installing [email protected] with npm fixes this for you, too?

aabmass avatar Jan 18 '17 14:01 aabmass

Also, I'm running npm version 4.1.1.

aabmass avatar Jan 18 '17 14:01 aabmass

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 [email protected] would solve this for now.

aabmass avatar Jan 19 '17 05:01 aabmass

Thank you @aabmass – fixed!

matheuss avatar Jan 20 '17 21:01 matheuss