Skip to content
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

[BUG] Transformer not working since RN 0.43 #2

Closed
rodrigopivi opened this issue Mar 22, 2017 · 10 comments
Closed

[BUG] Transformer not working since RN 0.43 #2

rodrigopivi opened this issue Mar 22, 2017 · 10 comments

Comments

@rodrigopivi
Copy link

After updating to RN 0.43, when i try to start the RN packager using a custom transformer like:

node node node_modules/react-native/local-cli/cli.js start --transformer node_modules/react-native-sm-transformer --skipflow"

I get a error at the packager output:

TransformError: /Users/rodrigo/Trabajo/goldfingr/mobile/index.ios.js: transformer.transform is not a function
@rodrigopivi rodrigopivi changed the title Can´t bundle using transformer since RN 0.43 [BUG] Can´t bundle using transformer since RN 0.43 Mar 22, 2017
@rodrigopivi rodrigopivi changed the title [BUG] Can´t bundle using transformer since RN 0.43 [BUG] Transformer not working since RN 0.43 Mar 22, 2017
@ghost
Copy link

ghost commented Apr 21, 2017

Is there any update on this?

@rodrigopivi
Copy link
Author

a workaround is using webpack with haul instead of rn packager

@ghost
Copy link

ghost commented Apr 21, 2017

@rodrigopivi ah, neat! I haven't seen haul. I'll look into that. For now I removed the custom transformer. I'll set up webpack as soon as I get annoyed because I don't have source maps. Haha

Thanks!

@dxiao
Copy link

dxiao commented May 9, 2017

I don't have time to fix this myself right now, but in case anybody right now wants to work on it, it's because of an API break in react-native/packager/transformer.js. It shouldn't be super hard to fix, just change module.exports to module.exports.transform and twiddle the arguments from {data: {filename: string}}, callback to src, filename, options. Only thing is figuring out how they refactored the callback argument into react-ative/packager/src/JSTransformer/worker/worker.js

@dxiao
Copy link

dxiao commented May 9, 2017

@Moskize91
Copy link

Moskize91 commented May 11, 2017

I fix by your way. it works without error, but it map to a wrong line.

@oskarsliukis
Copy link

Are there any updates on this?

@lukewlms
Copy link

TS debugging in RN likely won't work at all until this React Native issue with transformers is resolved.

@oskarsliukis @Moskize91

@ScottPierce
Copy link

Does anyone have a workaround for this yet? How is it that this has been broken for so long, and react-native hasn't fixed it yet?

@mhzed
Copy link
Owner

mhzed commented Jan 19, 2018

The code taps into the internals of react-native which obviously has changed in the subsequent versions, so the breakage of this little utility is kind of inevitable.
Follow the links in comments above should point you to solutions.
I will mark this project as deprecated to avoid confusion in the future.

@mhzed mhzed closed this as completed Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants