Comments (4)
Cannot parse compiler worker message
is not strictly an issue that would affect anything. LoggerPlugin
is to capture logs from Webpack and other plugins (which are using Webpack's logging), but if you want to get rid of it the error, there are 2 options:
The raw method:
console.log({
timestamp: Date.now(),
issuer: '<something_easily_identifiable>',
type: 'info', // or: 'debug' | 'info' | 'warn' | 'error'
message: ['<your message>'],
});
Or:
const logger = new LoggerPlugin();
console.log(
logger.createEntry(
'<something_easily_identifiable>',
'info', // or: 'debug' | 'info' | 'warn' | 'error',
['<your message>']
)
)
It's not ideal, but has to do for now. We might revisit it later to make it easier.
from repack.
Thanks for the response - yeah the bundle works etc. so this isn't a blocking issue for me, it just makes the console output hard to read.
Unfortunately in this case I don't always have control over the code that's calling console.log
. In particular, I'm using speed-measure-webpack-plugin to profile why my bundler is slow and it's generating output like this:
✖ [23:55:50.996Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'SMP ⏱' }
✖ [23:55:50.996Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'General output time took 55.47 secs' }
✖ [23:55:50.997Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'SMP ⏱ Plugins' }
✖ [23:55:50.997Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'TargetPlugin took 19.45 secs' }
✖ [23:55:50.997Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'SourceMapDevToolPlugin took 4.91 secs' }
✖ [23:55:50.998Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'LoggerPlugin took 1.25 secs' }
✖ [23:55:50.998Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'DevServerPlugin took 0.207 secs' }
✖ [23:55:51.000Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'DefinePlugin took 0.001 secs' }
✖ [23:55:51.000Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'SMP ⏱ Loaders' }
✖ [23:55:51.000Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'modules with no loaders took 32.22 secs' }
✖ [23:55:51.001Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 2753' }
✖ [23:55:51.001Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.001Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'babel-loader took 18.74 secs' }
✖ [23:55:51.001Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 931' }
✖ [23:55:51.002Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.002Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: '@callstack/repack took 5.68 secs' }
✖ [23:55:51.003Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 104' }
✖ [23:55:51.003Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.003Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'esbuild-loader took 5.23 secs' }
✖ [23:55:51.003Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 95' }
✖ [23:55:51.004Z][DevServerProxy] Cannot parse compiler worker message {
platform: 'ios',
message: '@pmmmwh/react-refresh-webpack-plugin, and'
}
✖ [23:55:51.004Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.004Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'esbuild-loader took 2.006 secs' }
✖ [23:55:51.004Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 48' }
✖ [23:55:51.004Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.005Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'graphql-tag took 1.59 secs' }
✖ [23:55:51.005Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 14' }
✖ [23:55:51.005Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.005Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'babel-loader, and' }
✖ [23:55:51.006Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'cache-loader, and' }
✖ [23:55:51.006Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'esbuild-loader took 0.363 secs' }
✖ [23:55:51.006Z][DevServerProxy] Cannot parse compiler worker message { platform: 'ios', message: 'module count = 1' }
Since the actual logs are not in my code, I can't manipulate the call site as you've suggested above.
from repack.
Based on the docs you could pass outputTarget
:
outputTarget: (...args) => {
console.log({
timestamp: Date.now(),
issuer: 'speed-measure-webpack-plugin',
type: 'info',
message: args,
});
}
Have you tried it?
from repack.
Looks like there's a solution posted in the previous comment, closing due to inactivity.
from repack.
Related Issues (20)
- Run android with error ERR_UNHANDLED_ERROR HOT 2
- Do containers that are not deployed independently need to set eager to true for react and react-native dependencies? HOT 4
- Happy for help: Getting the error "File artifacts/index.bundle for ios not found in compilation assets" HOT 11
- Question: do I need to add "ChunksToHermesBytecodePlugin" plugin? HOT 7
- Getting error "ReferenceError: Property 'CssSyntaxError' doesn't exist" while using styled-component. HOT 3
- [email protected] @callstack/repack/commands error HOT 3
- Can someone give me idea or tutorial how can i deploy my webpack bundle to local servers HOT 1
- Android Error when navigate Between MFEs HOT 9
- cannot load mini app(Module Federation) when verifyScriptSignature = 'strict' HOT 8
- Can't find variable: __wepack_require__ in ScriptManager.js HOT 10
- Unable to load script. Make sure you're either running Metro HOT 3
- Facing issue while implementing Offline Bundling. HOT 5
- Error in bundling micro apps with react-native-svg packages HOT 3
- [RFC] Override `start` command in `react-native.config.js` HOT 8
- Unhandled error in Webpack Compiler when doing `rpm run ios` HOT 2
- Cannot Resole React Hook Form correctly HOT 7
- repack monorepo deployment help
- Android is crashing when "onMessage" props is accessed in "react-native-webview" library HOT 1
- [RFC] sync API HOT 10
- Improve types for `prefetchScript` and `loadScript` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repack.