symbolicateMiddleware fails when platform is set to all
See original GitHub issueCurrent Behavior
When running haul start --platform all, symbolicateMiddleware throws whenever a log message is inspected.
TypeError: Cannot read property 'output' of undefined
at createSourceMapConsumer (<redacted>/node_modules/haul-cli/src/server/middleware/symbolicateMiddleware.js:41:30)
at symbolicateMiddleware (<redacted>/node_modules/haul-cli/src/server/middleware/symbolicateMiddleware.js:97:22)
at Layer.handle [as handle_request] (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:317:13)
at <redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:284:7
at Function.process_params (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:335:12)
at next (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:275:10)
at statusPageMiddleware (<redacted>/node_modules/haul-cli/src/server/middleware/statusPageMiddleware.js:16:3)
at Layer.handle [as handle_request] (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (<redacted>/node_modules/haul-cli/node_modules/express/lib/router/index.js:317:13)
Expected Behavior
No errors in the console. Either fail gracefully or (ideally) understand which compiler the source map should be loaded from.
The issue appears to be that when platform is all, the compiler passed to the middleware function is a MultiCompiler and contains an array of compilers: one for each platform. This may also be a problem with the other middleware components; I didn’t check.
Haul Configuration (webpack.haul.js)
webpack.haul.js
const path = require('path');
module.exports = ({ platform }, defaults) => ({
entry: `./src/index.${platform}.js`,
module: {
...defaults.module,
rules: [
...defaults.module.rules,
{
test: /\.(css|less)$/,
loaders: [path.join(__dirname, "native-css-loader.js"), 'less-loader', '<redacted>=' + __dirname + '/less-preamble.json'],
}
],
},
resolve: {
...defaults.resolve,
modules: [
"node_modules",
path.resolve(__dirname, "../../node_modules")
]
},
});
Your Environment
| software | version |
|---|---|
| Haul | 0.6.0-rf |
| react-native | 0.44.0 |
| node | 6.9.1 |
| npm or yarn | 3.10.8 |
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Expo CLI (0.3.2) depends on incompatible version of ... - GitHub
Error : Cannot find module '@expo/dev-server/build/webpack/symbolicateMiddleware'. Normal case that modules installed via Yarn 1.x.
Read more >Bundling with webpack - Expo Documentation
Learn about different webpack bundler configurations that can be customized.
Read more >no such file or directory, open '/opt/build/repo/assets/favicon.png'
Hello everyone, Since I upgraded the Expo SKD from version 45 to version 46, I can't get a build. I have the following...
Read more >haul - Faltan mapas de origen en las compilaciones de desarrollo ...
lineNumber}:${frame.column} symbolicate failed: no source map`); console.warn(' valid files:', ...sourceMapConsumers.keys()); return; } const position = ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Holy shit it worked!
Hey, i haven’t had time just yet. But it’s been weighing-in on my guilt-o-meter tho.
You’re welcome to steal it from me, but I can find time this week for sure.