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.

Please help. Build crash.

See original GitHub issue

I created a new project using react-native init. After that I added react-native-tab-view package which requires react-native-gesture-handler and created component Tabs.js.

Also I changed babel.config.js to use different configurations for development and production environments.

When I run ./gradlew assembleRelease , I get the error

error SyntaxError: /Users/pavelturchik/work/test/node_modules/react-native-gesture-handler/Swipeable.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (14:8):

  12 | const DRAG_TOSS = 0.05;
  13 |
SyntaxError: /Users/pavelturchik/work/test/node_modules/react-native-gesture-handler/Swipeable.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (14:8):
> 14 | export type PropType = {

     |        ^
  15 |   children: any,
  16 |   friction: number,
  12 | const DRAG_TOSS = 0.05;
  17 |   leftThreshold?: number,
  13 |

> 14 | export type PropType = {
Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation. Run CLI with --verbose flag for more details.
     |        ^
  15 |   children: any,
  16 |   friction: number,
  17 |   leftThreshold?: number,

Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.
    at Parser.raise (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:6930:17)
    at Parser.expectPlugin (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:8328:18)
    at Parser.maybeParseExportDefaultSpecifier (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:11706:12)
    at Parser.parseExport (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:11658:29)
    at Parser.parseStatementContent (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:10715:27)
    at Parser.parseStatement (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:10611:17)
    at Parser.parseBlockOrModuleBlockBody (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:11187:25)
    at Parser.parseBlockBody (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:11174:10)
    at Parser.parseTopLevel (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:10542:10)
    at Parser.parse (/Users/pavelturchik/work/test/node_modules/@babel/parser/lib/index.js:12051:10)

If I add @babel/plugin-proposal-export-default-from - nothing will change. Error remains.

For default babel.config.js - all good.

Example project: https://github.com/pturchik/react-native-test.

Can anybody help me what I am doing wrong. I will need different configurations in future for development and production.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

2reactions
dantenolcommented, Feb 11, 2020

Any updates?

1reaction
awkward-minioncommented, Apr 2, 2020

@pturchik Thank you for reply,

The issue was resolved using two separate files for web and mobile (ref: platform specific code guidelines )

I have moved rn specific code to .native.js and web specific code to .js files

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] - New PC build - System crashes/freezes when ...
Hello Everyone, I just finished by new PC build, I am experiencing an issue and would really appreciate any help.
Read more >
Sudden crash on launch from all TestFlight builds
We've been getting a crash on launch starting today from all processed builds from TestFlight. An identical build we submitted the day before...
Read more >
[FNV] Camp Mccarran Terminal Building crash. Please help.
Whenever I enter the Camp Mccarran Terminal Building I am only able to take a few steps before the game crashes and the...
Read more >
Build Crash. - Unity Forum
Hi! I have a long-time issue trying to convert my project from 2020. I also created a clean project and import my assets,...
Read more >
Please Help!! How Can I Prevent My App From Crashing On ...
it show the start screen with the music, but when the world game play loads it crashes. this is the error i keep...
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