question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native bundling error because of babel plugin in graphql package

See original GitHub issue

Hi, I installed the apollo-client on react-native and got this error:

transformed 1390/1392 (100%)[node-haste] Encountered an error while persisting cache:
ReferenceError: Unknown plugin "transform-runtime" specified in "/Users/9_Semester/node_modules/graphql/package.json" at 5, attempted to resolve relative to "/Users/9_Semester/node_modules/graphql"
at /Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:179:17
at Array.map (native)
at Function.normalisePlugins (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:155:20)
at OptionManager.mergeOptions (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:277:36)
at OptionManager.addConfig (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:207:10)
at OptionManager.findConfigs (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:419:30)
at OptionManager.init (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/options/option-manager.js:461:12)
at File.initOptions (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/index.js:194:75)
at new File (/Users/9_Semester/node_modules/babel-core/lib/transformation/file/index.js:123:22)
> TransformError: /Users/9_Semester/node_modules/graphql/language/parser.js: Unknown plugin "transform-runtime" specified in "/Users/9_Semester/node_modules/graphql/package.json" at 5, attempted to resolve relative to "/Users/9_Semester/node_modules/graphql"

After installing the babel-plugin-transform-runtime I got the same error with the preset es2015. After installing them both, it works.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
stubailocommented, Jun 28, 2016

I’m going to tackle React Native this week. It seems like just a very small modification would fix this bug, and then we can put React Native on the homepage.

1reaction
martijnwalravencommented, May 2, 2016

Yes, I also had to install these manually, see here for the steps I followed. I linked to what might be a related issue about React Native’s Packager there, but I don’t fully understand what is going on or what we can do about it yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

babel-relay-plugin with react-native (expo) throwing error ...
I am trying to implement react-relay in an expo project using the babel-plugin-relay package. It was working on expo web ( npm run...
Read more >
react native reanimated error - You.com | The search engine you ...
When I installed it with yarn add react-native-reanimated@next , I got the same error because the specific version has not been specified to...
Read more >
babel/plugin-transform-runtime
A plugin that enables the re-use of Babel's injected helper code to save on codesize.
Read more >
Compiling queries with Babel - Apollo GraphQL Docs
With babel-plugin-import-graphql , you can just include your fragment in your GraphQL file along-side whatever uses it, or even import it from a...
Read more >
Gatsby Changelog | 5.3.0
In normal circumstances the errors thrown by GraphQL or Gatsby itself ... Use babel-plugin-lodash to reduce lodash size published packages, via PR #35947 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found