Closed iRoachie closed 7 years ago
That's odd. With the latest version of react-native-typescript-transformer, the error should hopefully be Cannot find module 'metro-bundler/src/transformer'
if #19 is anything to go by.
Anyway proper 0.46 support is top priority for me today after work, in a few hours.
@ds300 There seems to be another problem as well with react-native's transformer in general. https://github.com/facebook/react-native/issues/14866
I'll close this now since there's a PR for this already.
I still having this error
https://github.com/facebook/react-native/issues/14866#issuecomment-337889887
Using:
"react-native-typescript-transformer": "^1.1.4"
I was having this issue as well and was able to fix this by manually installing metro-bundler
as a dev dependency (latest, v0.20.0 as of now) as this seems to be where react-native-typescript-transformer tries to require from.
My env: React: 16.0.0-alpha.12 React Native: 0.48.0 react-native-typescript-transformer: 1.1.4
Command that fixed it: npm install --save-dev metro-bundler
Yes if you're seeing this error Cannot find module 'react-native/packager/transformer'
it means that the following code is failing:
So metro-bundler is probably either installed in a nested node_modules somewhere, or is using a new directory structure so the transformer can't be loaded from 'metro-bundler/src/transformer' or 'metro-bundler/build/transformer'
Doing what @pehlert suggested should fix the problem in the first case. In the last case you should submit a new issue.
I think they're some new changes regarding the packager in the newest version of react-native.
Error looks like this: Cannot find module 'react-native/packager/transformer'