-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
TransformError: ENOENT no such file or directory .babelrc with precompiled npm module #7906
Comments
This is probably related to this issue: #7850 |
I have this problem also on a module that doesn't use .babelrc anymore. It just strikes me that these issues come out of nowhere. Seems to have worked before and now completely stuck. |
@mschipperheyn Try resetting the packager's cache:
Also bear in mind that react-native's transform picks up |
@fab1an this really works! save my day ! thx~ |
@chengmu Can you close this? |
I confirm that this works! |
Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why. |
This helped for me, except that now I found the packager script here: |
I have a personal npm module, written in es6. It has a prepublish hook that babel transpiles it to es5. In
package.json
themain
field points to the compiled version..babelrc
and es6src/
are added to.npmignore
. So to anyone installing the npm module, the fact that the module is written in es6 should be "invisible". This holds true when installing the module in regular react/webpack builds for both browser and electron.However, when installing the module in my react native app, I get an error along the lines of:
TransformError: ENOENT no such file or directory .babelrc
Here is a screenshot of the full error: https://www.dropbox.com/s/5lwe5fyf44emh6l/Screenshot%202016-06-03%2000.43.53.png?dl=0
The npm module can be found here: https://github.com/felixmc/redux-actions-magic
Feel free to try it for yourself.
I can't seem to find many other running into this issue..If I include the
.babelrc
in the module, I get a series of other errors (couldn't find X preset, etc). Other issues on here seem to suggest that.babelrc
should be avoided in npm packages anyway for that very reason.I guess don't understand why react-native would even be looking for a
.babelrc
. The module only has babel as a dev dependency.Here are my versions of things:
node: 6.2.0
react-native-cli: 0.2.0
react-native: 0.26.3
The error happens in both the android and ios emulators. My dev environment is OS X.
The text was updated successfully, but these errors were encountered: