Comments (11)
Hello, which version of node do you use ?
I have updated the stackframe library recently, we could easily rollback.
I'm curious why CI did not catch this error thought...
from friendly-errors-webpack-plugin.
Can you reproduce the error with version 1.1.3 ?
from friendly-errors-webpack-plugin.
Should be fixed in v1.3.1. Please test it and tell me if it worked 😄
from friendly-errors-webpack-plugin.
I'm using node v7.4.0.
I currently testing it, but I think there was some massive conflict with another package called "pretty-error".
from friendly-errors-webpack-plugin.
I think the check has its place in the codebase, better safe than sorry.
Yes, it's weird: it could happen if webpack throws an error without having an original stacktrace (loader or something).
I've never seen it happen but, you know, webpack
I'm curious to have your final diagnostic, though
from friendly-errors-webpack-plugin.
Yup, pretty errors messes up with stackframes.
Maybe you should open a bug there ?
from friendly-errors-webpack-plugin.
Yeah webpack can be really funny.
The structure was something like:
{ fileName: '\u001b[0m \u001b[0m\u001b[97mParent style sheet: stdin\u001b[0m',
source: '\u001b[0m \u001b[0m\u001b[97mParent style sheet: stdin\u001b[0m' },
{ functionName: '\u001b[0m \u001b[0m\u001b[97m in /zzz/blabla.scss (line 2, column 1)\u001b[0m' },
{ functionName: '\u001b[0m \u001b[0m' },
from friendly-errors-webpack-plugin.
Yep why not - it's always good if library don't disturb each other. I honestly have not much insights about both libs, just found friendly-errors-webpack-plugin
before a hour :P So I currently cannot describe a change suggestion in their repo.
However I ended up just disable pretty-error. it works great now. Now friendy-errors are prettier!
from friendly-errors-webpack-plugin.
Wondering if you plan to merge some other common transformers etc. which are used a lot by webpack? I currently try to write custom ones but must research the code because the readme missing the function signatures and the error object structure. I try & error now...
from friendly-errors-webpack-plugin.
Your call.
To detect if an error comes from the eslint loader, we have no other choice than looking at the stackframe to see if it's in there somewhere.
So we use error-stack-parser
to get a proper array of stackframes that we can investigate instead of a string.
The error you saw was because we assumed that the stackframe would always have a fileName
field and that it should be a string.
We could actually write the following check tyepeof stackframe.fileName === 'string'
but that would be a really weird precaution to take
from friendly-errors-webpack-plugin.
So I guess you could come up this the following repro if I understand the problem correctly:
require('pretty-error').start();
const ErrorStackParser = require('error-stack-parser');
const stack = ErrorStackParser.parse(new Error())
expect(stack.every(s => typeof s.fileName === 'string')).toBeTruthy()
from friendly-errors-webpack-plugin.
Related Issues (20)
- Blank error when only webpackError property populated
- module is undefined
- show time even if warning appears
- Missing Error Filtering Feature
- Stylelint output does not show the name of the file where warnings occur
- Cannot read property 'request' of undefined at transform HOT 2
- Cannot read property 'some' of undefined
- Missing error report for failed compilation
- Can this plugin work with ForkTsChecker plugin when clearConsole is true? HOT 7
- Is 2.x ready for release? HOT 2
- compilationSuccessInfo.message not show HOT 1
- Peer Dependency issue with Webpack v5.x HOT 4
- Type 'FriendlyErrorsWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
- Forget update the Readme on NPM HOT 1
- Cannot read property 'startsWith' of undefined HOT 2
- should not output warning when the count of warnings is 0 HOT 4
- Support for displaying compilationSuccessInfo only on initial compilation HOT 1
- Does not work with Node.js v12 HOT 2
- recommending a different eslint-loader formatter in the docs
- Compilation is always succesful when it should not be HOT 1
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 friendly-errors-webpack-plugin.