Error when using log-level 5
See original GitHub issue🐛 bug report
If you specify log-level 5 an error is thrown and the build fails.
🎛 Configuration (.babelrc, package.json, cli command)
parcel build src/index.hbs --log-level 5
🤔 Expected Behavior
A log file should be created
😯 Current Behavior
[1:05:19 AM]: Building...
events.js:173
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'D:\git\personal-website\parcel-debug-2019-05-31T15:05:19.980Z.log'
Emitted 'error' event at:
at fs.open (internal/fs/streams.js:292:12)
at FSReqCallback.args [as oncomplete] (fs.js:147:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! personal-website@ build: `parcel build src/index.hbs --log-level 5`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the personal-website@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\josh\AppData\Roaming\npm-cache\_logs\2019-05-31T15_05_20_019Z-debug.log
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.12.3 |
Node | 11.6.0 |
npm | 6.5.0-next.0 |
Operating System | Windows 10 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
When to use the different log levels - Stack Overflow
The ERROR log level can be used when one of the payment systems is not available, but there is still the option to...
Read more >Log Levels Explained and How to Use Them - Better Stack
The ERROR log level is used to represent error conditions in an application that prevent a specific operation from running, ...
Read more >Logging Levels: What They Are & How to Choose Them
ERROR – the log level that should be used when the application hits an issue preventing one or more functionalities from properly functioning....
Read more >LogLevel Enum (Microsoft.Extensions.Logging)
Specifies that a logging category should not write any messages. Logs that contain the most detailed messages. These messages may contain sensitive application ......
Read more >loglevel - npm
Log things at a given level (trace/debug/info/warn/error) to the console object (as seen in all modern browsers & node. · Filter logging by...
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
If you could do it, I’d be happy. I’m running low on spare time this week. And besides, you’ve clearly been annoyed by this bug far longer than me 😄
I came across this bug as well. This is because the log file name contains a date/time string with colons, which is not a valid character on Windows:
https://github.com/parcel-bundler/parcel/blob/master/packages/core/logger/src/Logger.js#L78
A quick string.replace with dashes or some other valid character should do the trick:
🌍 Your Environment