-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use path.replaceWith() with a source string, use path.replaceWithSourceString() #576
Comments
Thanks. Do you have a small snippet as input to reproduce this ? |
Our codebase is pretty large. I am not sure what caused this error when minifying. I was using the babili webpack plugin with the following options. (isProdFlavor = true);
|
@INRIX-Xiaodi-Huang I've had the same error when updating babili-webpack-plugin from 0.0.11 to 0.1.1. Are you using that too? |
Using babili version 0.1.3 I got the error |
Can you share the stack trace ? |
|
same here! +1 |
/cc @j-f1 Do you know why this happens in the swap function ? |
@boopathi I have no idea. It appears that all of the methods used return nodes. Can anyone provide an example snippet that fails? |
+1 |
@michaeltrim Can you provide an example code snippet that fails? |
@j-f1 Any suggestions for how to figure out what line of code is failing? There's not much in the stack trace so finding the failing chunk of code seems pretty impossible in a large project. |
guys I have no way to provide snippets for the fail :( |
Not sure how to provide a code snippet that fails. I get the Error: ERROR in unknown: Don't use when I run yarn run build-main and do a stack trace before the error is thrown I get the following, not sure if that helps: at NodePath.replaceWith (/myapp/node_modules/babel-traverse/lib/path/replacement.js:140:13) |
I can see that the method path.replaceWith() is getting passed a string of "[object Object]" |
@michaeltrim Can you try replacing |
@j-f1 That has fixed the error when running yarn run build-main, thank you. yarn run package still doesn't complete but this may be unrelated just doing some investigation and will let you know. |
@j-f1 So the build does eventually work but I'm getting an out of memory error in the source map generator, not sure if this is connected but it didn't occur before ] |
Believe memory issue related to #332 |
@j-f1 This patch fixed the issue for me as well. Thanks! |
@j-f1 is a patch about to be release soon? |
I was just checking to see if that fixed the problem. The PR above includes that fix. |
* Should fix #576 People were calling `"foo".toString() or ["foo", "bar"].toString()`, which returned the real JS string `"[object Object]"`, the stringified version of the replacements object. * Prettier code means prettier green checkmarks * Testing testing 123 * Forgot the parens around the object literal * Semicolons! * npm run format
Is this on npm yet? Asking because i still get this error message. |
It's really urgent. |
I've downgraded to 0.0.11 while waiting. If it's breaking production builds
then you could do the same.
I think they said it would be released this afternoon. If downgrading is
too much trouble
…On Mon, 19 Jun 2017 at 17:53 Yan Zhabin ***@***.***> wrote:
It's really urgent.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#576 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACZOuC1MLhDyJN2KYoUMjrl_CWsA_3eZks5sFqeigaJpZM4N43b0>
.
|
Just tried the 0.1.1 and it's broken as well 😱 |
0.0.11
…On Tue, 20 Jun 2017 at 08:47 damiano.barbati ***@***.***> wrote:
Just tried the 0.1.1 and it's broken as well 😱
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#576 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACZOuCoAIe9kCjYj5pI7dMfi3ArDA63bks5sF3ksgaJpZM4N43b0>
.
|
@ahumphreys87 yep, using that for now thanks! |
Awesome, fingers crossed the fix version won't be long
…On Tue, 20 Jun 2017 at 08:56 damiano.barbati ***@***.***> wrote:
@ahumphreys87 <https://github.com/ahumphreys87> yep, using that for now
thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#576 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACZOuHzVhlXtNe8VBbMX3-0JgZNhO0xiks5sF3sXgaJpZM4N43b0>
.
|
New version is released now with this fix https://github.com/babel/babili/releases/tag/babili%400.1.4 |
problems with babel-traverse...em... |
ERROR in unknown: Don't use
path.replaceWith()
with a source string, usepath.replaceWithSourceString()
Seems to be the result of this change :
https://github.com/babel/babili/pull/543/files
The text was updated successfully, but these errors were encountered: