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.

Webpack error on flareact dev

See original GitHub issue

Running into this error when running webpack dev.

$ flareact dev
Starting Flareact dev server...
[worker]  (webpack)/buildin/global.js
[worker] Module not found: Error: Can't resolve '@babel/runtime/helpers/typeof' in 'C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\buildin'
[worker] resolve '@babel/runtime/helpers/typeof' in 'C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\buildin'
[worker]   Parsed request is a module
[worker]   using description file: C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\package.json (relative path: ./buildin)
[worker]     Field 'browser' doesn't contain a valid alias configuration
[worker]     resolve as module
[worker]       C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\buildin\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\AppData\Local\.wrangler\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\AppData\Local\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\AppData\node_modules doesn't exist or is not a directory
[worker]       C:\Users\norwo\node_modules doesn't exist or is not a directory
[worker]       C:\Users\node_modules doesn't exist or is not a directory
[worker]       C:\node_modules doesn't exist or is not a directory
[worker]       looking for modules in C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules
[worker]         using description file: C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\package.json (relative path: ./node_modules)
[worker]           Field 'browser' doesn't contain a valid alias configuration
[worker]           using description file: C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\package.json (relative path: ./node_modules/@babel/runtime/helpers/typeof)
[worker]             no extension
[worker]               Field 'browser' doesn't contain a valid alias configuration
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof doesn't exist
[worker]             .wasm
[worker]               Field 'browser' doesn't contain a valid alias configuration
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.wasm doesn't exist
[worker]             .mjs
[worker]               Field 'browser' doesn't contain a valid alias configuration
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.mjs doesn't exist
[worker]             .js
[worker]               Field 'browser' doesn't contain a valid alias configuration
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.js doesn't exist
[worker]             .json
[worker]               Field 'browser' doesn't contain a valid alias configuration
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.json doesn't exist
[worker]             as directory
[worker]               C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof doesn't exist
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\buildin\node_modules]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\webpack\node_modules]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\node_modules]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\node_modules]
[worker] [C:\Users\norwo\AppData\Local\node_modules]
[worker] [C:\Users\norwo\AppData\node_modules]
[worker] [C:\Users\norwo\node_modules]
[worker] [C:\Users\node_modules]
[worker] [C:\node_modules]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.wasm]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.mjs]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.js]
[worker] [C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\node_modules\@babel\runtime\helpers\typeof.json]
[worker]  @ (webpack)/buildin/global.js 1:0-52 13:53-60
[worker]  @ D:/Code/JS/flareact-fork/node_modules/react-helmet/es/Helmet.js
[worker]  @ D:/Code/JS/flareact-fork/src/worker/index.js
[worker]  @ D:/Code/JS/flareact-fork/src/worker/worker.js
[worker]  @ D:/Code/JS/flareact-fork/src/index.js
[worker]  @ ./index.js
[worker] Error: webpack returned an error. Try configuring `entry` in your webpack config relative to the current working directory, or setting `context = __dirname` in your webpack config.
[worker] wrangler dev exited with code 1
--> Sending SIGTERM to other processes..
[client] webpack-dev-server --config node_modules/flareact/configs/webpack.client.config.js --mode development exited with code 1
[ 1, 1 ]
Done in 10.38s.

I don’t understand the underlying cause of the issue but it was resolved by installing @bable/runtime directly into the wrangler packages location on my machine.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
william1616commented, Nov 29, 2020

@d2x it seams to work if you run npm i @babel/runtime in path in the error log - in this case C:\Users\norwo\AppData\Local\.wrangler\wranglerjs-1.11.0\

0reactions
tj-kevcommented, Jul 28, 2022

Have you tried running under WSL?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting issue while trying flareact template. in local - Workers
Hi, while trying the flareact sample to run in local as per the link below. ... [client] NODE_ENV=development webpack-dev-server --config ...
Read more >
Custom Webpack Config - Flareact
Custom Webpack Config · dev : Boolean - Indicates if the compilation will be done in development · isWorker : Boolean - It's...
Read more >
React not starting server due to webpack and deprecated ...
React not starting server due to webpack and deprecated software I believe [Summary: What are dev tools and how can I add it...
Read more >
flareact - Bountysource
Running into this error when running webpack dev. $ flareact dev Starting Flareact dev server... [worker] (webpack)/buildin/global.js [worker] Module not ...
Read more >
webpack-sources examples - CodeSandbox
Learn how to use webpack-sources by viewing and forking webpack-sources example apps on CodeSandbox.
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