question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

babel-loader 8.0.0 fails, but 8.0.0-beta.4 works perfectly

See original GitHub issue

BEFORE YOU SUBMIT please read the following:

Delete what isn’t applicable below I’m submitting a bug report I’m submitting a feature request I’m submitting a support request => Please do not submit support request here, see note at the top of this template.

Webpack Version: 4.17.1

Babel Core Version: 7.0.0

Babel Loader Version: 8.0.0

Please tell us about your environment: Windows 7 x64

Current behavior: Here’s just a small sample of the very long list of console messages. First message - error:

storage.js:26 Uncaught ReferenceError: exports is not defined
    at Module.<anonymous> (storage.js:26)
    at Module../app/utils/electron/storage.js (renderer.dev.js:34068)
    at __webpack_require__ (bootstrap:724)
    at fn (bootstrap:101)
    at Module../app/utils/electron/index.js (renderer.dev.js:33851)
    at __webpack_require__ (bootstrap:724)
    at fn (bootstrap:101)
    at Module.<anonymous> (renderer.dev.js:22555)
    at Module../app/index.js (renderer.dev.js:22738)
    at __webpack_require__ (bootstrap:724)

followed by these warnings:

(anonymous) @ storage.js:26
./app/utils/electron/storage.js @ renderer.dev.js:34068
__webpack_require__ @ bootstrap:724
fn @ bootstrap:101
./app/utils/electron/index.js @ renderer.dev.js:33851
__webpack_require__ @ bootstrap:724
fn @ bootstrap:101
(anonymous) @ renderer.dev.js:22555
./app/index.js @ renderer.dev.js:22738
__webpack_require__ @ bootstrap:724
fn @ bootstrap:101
0 @ log.js:47
__webpack_require__ @ bootstrap:724
(anonymous) @ bootstrap:791
(anonymous) @ bootstrap:791
sockjs.js:1605 XHR finished loading: GET "http://localhost:1212/sockjs-node/info?t=1535560470291".
AbstractXHRObject._start @ sockjs.js:1605
(anonymous) @ sockjs.js:1494
setTimeout (async)
AbstractXHRObject @ sockjs.js:1493
XHRCorsObject @ sockjs.js:2871
InfoAjax @ sockjs.js:356
InfoReceiver._getReceiver @ sockjs.js:539
InfoReceiver.doXhr @ sockjs.js:556
(anonymous) @ sockjs.js:525
setTimeout (async)
InfoReceiver @ sockjs.js:524
SockJS @ sockjs.js:730
initSocket @ socket.js:9
(anonymous) @ client?5bf0:212
./node_modules/webpack-dev-server/client/index.js?http://localhost:1212 @ renderer.dev.js:50057
__webpack_require__ @ bootstrap:724
fn @ bootstrap:101
0 @ log.js:47
__webpack_require__ @ bootstrap:724
(anonymous) @ bootstrap:791
(anonymous) @ bootstrap:791
sockjs.js:1605 XHR finished loading: GET "http://localhost:1212/sockjs-node/info?t=1535560470293".
AbstractXHRObject._start @ sockjs.js:1605
(anonymous) @ sockjs.js:1494
setTimeout (async)
AbstractXHRObject @ sockjs.js:1493
XHRCorsObject @ sockjs.js:2871
InfoAjax @ sockjs.js:356
InfoReceiver._getReceiver @ sockjs.js:539
InfoReceiver.doXhr @ sockjs.js:556
(anonymous) @ sockjs.js:525
setTimeout (async)
InfoReceiver @ sockjs.js:524
SockJS @ sockjs.js:730
initSocket @ socket.js:9
(anonymous) @ client?8f77:212
./node_modules/webpack-dev-server/client/index.js?http://localhost:1212/ @ renderer.dev.js:50317
__webpack_require__ @ bootstrap:724
fn @ bootstrap:101
0 @ log.js:47
__webpack_require__ @ bootstrap:724
(anonymous) @ bootstrap:791
(anonymous) @ bootstrap:791
client?5bf0:77 [WDS] Hot Module Replacement enabled.
client?5bf0:148 [WDS] Warnings while compiling.
warnings @ client?5bf0:148
onmessage @ socket.js:41
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:887
SockJS._transportMessage @ sockjs.js:885
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2961
client?5bf0:154 ./app/redux/actions/helpScreen_actions.js 19:10-35

the list of warnings was very long. This is far from all of them.

Expected/desired behavior: No errors - as in 8.0.0-beta.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
SilentFlutecommented, Dec 14, 2018

@Slapbox it seems u don’t solve this problem yet……i occur this problem too, and i use Webpack Version: 4.26.1

Babel Core Version: 7.0.0

Babel Loader Version: 8.0.4 babel-loader^8.0.0 doesn’t work neither…… seems like babel can’t transpiled export default, well, it’s babel-loader^8.0.0+ can’t do it actually……(may be) until u said babel-loader^8.0.0-beta.4 works perfectly, i tried install babel-loader^8.0.0-beta.4 instead babel-loader^8.0.0: Webpack Version: 4.26.1

Babel Core Version: 7.0.0

Babel Loader Version: 8.0.0-beta.4 it worked!!! i don’t know why, but it worked thx ; )

1reaction
loganfsmythcommented, Aug 30, 2018

You can always opt into the old behavior by setting modules: “commonjs” in your preset-env options to get the old behavior for now.

Generally mixing module types is a bad idea. Mocking depends a bit on what test framework you’re using, but for instance Jest as jest.mock.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed installing babel-loader@8.0.0-beta · Issue #8211 - GitHub
Bug Report Current Behavior Documentation says: npm install "babel-loader@^8.0.0-beta" @babel/core @babel/preset-env webpack but npm install ...
Read more >
Cannot find module '@babel/core' - node.js - Stack Overflow
Try running this. npm install @babel/core --save. babel changed their package so your babel-core will not be the same as @babel/core .
Read more >
When magic fails — a programmer grows | by Yonatan Kra
Here's a story about how failures can lead you to a pull request in a very popular open source project. I learn a...
Read more >
babel-loader - npm
babel module loader for webpack. Latest version: 9.1.0, ... Start using babel-loader in your project by running `npm i babel-loader`.
Read more >
styleguidist/styleguidist - Gitter
I have a problem with yarn upgarde-interactive. I got this error messages. What is wrong? [3/4] Linking dependencies... warning "babel-loader@6.4.1" has ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found