-
Notifications
You must be signed in to change notification settings - Fork 47
Transformation error; return original code #68
Comments
I am also experiencing this error. |
+1 |
2 similar comments
+1 |
+1 |
Using the |
I'll have to investigate if I can solve this without |
Similar to #47 |
I am also facing the same issue +1 |
Hi @almasakchabayev After some code surfing 🏄 Here is deduction http://tonicdev.com/douglasduteil/isparta-68-transformation-error-return-original-code |
I am still facing same issue, even though I have changed as you mentioned
.babelrc
|
Aie @kishorevarma |
@douglasduteil , oh yeah I missed that part in TonicDev , yeah now I am using as follow
but now there is no error, its silently exiting, when I change .babelrc to as follow, it actually run the tests but won't generate the report because stage option not recognisable (unknown option)
so If I am using as follow, it not running tests and not giving report and not giving error :(
|
@douglasduteil ignore I think its some problem with babel versions. I will try to find out the issue |
@douglasduteil, I sorted out the issues but got struck with decorators trnasformation in babel 6. but the above issue got resolved thanks, I am using with out babel-node as shown in your example Thanks |
I have the same issue, tried all above tips but they didn't work for me. |
+1 |
I have the same issue but it doesn't seem to affect the end result. Here's the command I'm running:
What I found is that by adding the configuration below to
That did the trick for me. |
FYI; The reason (as described above) is a default inclusion pattern. The solution is passing on a root where files are checked only. This may also speed up the whole thing depending on your setup (since it won't have to cover your entire repo but just your source files). You also don't need a yml file for this as
|
@qfox Your solution worked, thank you :) |
@montogeek @qfox solution does not work for me.
https://github.com/ngduc/react-setup/blob/master/package.json |
@qfox Thank you so much! Your solution works for me. That error was driving me crazy. Also after adding that my coverage went up by 6%, has anyone else seen a coverage spike like that upon fixing this error? |
* Add npm script `cover`, which calls istanbul: * Do not execute `istanbul` via `babel-node`, this is deprecated, instead use `babel-register` as an argument to `mocha` (credit: gotwarlost/istanbul#594 (comment)) * Use `--root src/` to fix issue where istanbul also attempts to cover `mocha` (credit: douglasduteil/isparta#68 (comment)) * Use `--include-all-sources` to make the coverage percentages actually meaningful by including sources that didn't get executed * In `src/higher_order_components/errors_normalizer.js`, make minor change to return statement. This form: `if (foo) return { a: 'b' }` seems to have confused Istanbul's coverage highlighter. There are other cases like this, that are bugs in Istanbul (e.g. gotwarlost/istanbul#557). Probably worth making a repro case for this and reporting to them.
* Add npm script `cover`, which calls istanbul: * Do not execute `istanbul` via `babel-node`, this is deprecated, instead use `babel-register` as an argument to `mocha` (credit: gotwarlost/istanbul#594 (comment)) * Use `--root src/` to fix issue where istanbul also attempts to cover `mocha` (credit: douglasduteil/isparta#68 (comment)) * Use `--include-all-sources` to make the coverage percentages actually meaningful by including sources that didn't get executed * In `src/higher_order_components/errors_normalizer.js`, make minor change to return statement. This form: `if (foo) return { a: 'b' }` seems to have confused Istanbul's coverage highlighter. There are other cases like this, that are bugs in Istanbul (e.g. gotwarlost/istanbul#557). Probably worth making a repro case for this and reporting to them.
This is still going on for me.
|
It is now working with |
undering [email protected] and [email protected], I find that if variable's name is same as function's name will throw this error. such as:
|
Hello,
when I run
I get the following error:
Although tests pass and report is generated after the error...
I downgraded from 3.0.4 to 3.0.2 and error disappered.
Thanks
The text was updated successfully, but these errors were encountered: