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.

[Bug]: SyntaxError with file in node_module Unexpected token, expected "," (4:7), ...

See original GitHub issue

Mapbox Implementation

Mapbox

Mapbox Version

default

Platform

iOS

@rnmapbox/maps version

10.0.0-beta.57 and older

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

No response

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

Screenshot 2022-11-17 at 19 23 56

OS: Macbook pro M1 2021 React native: 0.68.2 NOTE: Our app still use JS code and function component. Please help here and feel free to request anything help reslove this issues.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:3
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
MinhOmegacommented, Dec 6, 2022

Hi @xotahal , Thanks for support me. I have downgrade to version "@react-native-mapbox-gl/maps": "^8.5.0", and it working now @@.

image

1reaction
xotahalcommented, Nov 26, 2022

Try to change it to ^7.x.x. And make sure you getting all versions higher than 7.16. You can check this by running yarn why @babel/core. Many packages fetches the @babel/core. Also run yarn dedupe to get rid of versions you don’t need. Hope it helps 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError with file in node_module Unexpected token ...
I have integration rnmapbox/maps#main via repo github in iOS and have some error from node_module. I have create issues in github too via...
Read more >
Issues - GitHub
error : SyntaxError: .../node_modules/react-native/Libraries/Components/Touchable/Touchable.js: Unexpected token, expected "]" (25:45) #34719.
Read more >
Why do i see the error SyntaxError: Unexpected token { on ...
Hi there! I've tried to deploy my website for some time now. This is the error, i really cant find any information about...
Read more >
ts-node unexpected token 'export' - You.com | The Search ...
I'm getting SyntaxError: Unexpected token 'export' on some node_modules , which are not transpiled (I guess?). I worked around this by adding these...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Unexpected token is similar to syntax error but more specific.Semicolon(;) in JavaScript plays a vital role while writing a programme. Usage: To ...
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