andrenerd / react-native-bootstrap-styles

Bootstrap style library for React Native
93 stars 12 forks source link

Module not found: Can't resolve #58

Closed om1 closed 3 years ago

om1 commented 3 years ago

Hi, i am getting the follwing error after a brand new project installation with expo init:

Module not found: Can't resolve '@babel/runtime/helpers/classCallCheck' in '..\node_modules\react-native-bootstrap-styles\src'

andrenerd commented 3 years ago

Hi Oleg, have tried to reproduce the issue, but without success. could you share your package.json?

Here is my setup with the app files:

expo init name
npm install react-native-bootstrap-styles
expo start

package.json:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~40.0.0",
    "expo-status-bar": "~1.0.3",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
    "react-native-bootstrap-styles": "^0.4.5-0-m",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}

app.js:

import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

import BootstrapStyleSheet from 'react-native-bootstrap-styles';

const bootstrapStyleSheet = new BootstrapStyleSheet();
const { s, c } = bootstrapStyleSheet;

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
        <Text style={[s.text, s.textPrimary]}>Hello world! 🤓🚀🚀🚀</Text>
      <StatusBar style="auto" />
    </View>
  );
}

and the screenshot:

Screenshot 2020-12-18 at 05 31 46
om1 commented 3 years ago

Hi Andrei, thanks for the fast reply. After a secound try it seems to work (at least it didnt break). But the container style seems not to work properly:

63247b25-7962-4415-90c9-239cb64269b5

My package.json and App.tsx:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~40.0.0",
    "expo-status-bar": "~1.0.3",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
    "react-native-bootstrap-styles": "^0.4.5-0-m",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "@types/react": "~16.9.35",
    "@types/react-dom": "~16.9.8",
    "@types/react-native": "~0.63.2",
    "typescript": "~4.0.0"
  },
  "private": true
}

import {StatusBar} from 'expo-status-bar';
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';

import BootstrapStyleSheet from 'react-native-bootstrap-styles';

const bootstrapStyleSheet = new BootstrapStyleSheet();
const {s, c} = bootstrapStyleSheet;

export default function App() {
    return (
        <View style={s.container}>
            <Text>Open up App.js to start working on your app!</Text>
            <Text style={[s.text, s.textPrimary]}>Hello world! 🤓🚀🚀🚀</Text>
            <StatusBar style="auto"/>
        </View>
    );
}
andrenerd commented 3 years ago

Oleg, thanks for letting me know. Will try to fix and push a new version soon.

andrenerd commented 3 years ago

Oleg, hasn't been able to reproduce too. Here is the screenshot of the example from above, running on Pixel4 API30 simulator. If you figure out why it looks different on your device, please, share the details here.

Screenshot 2020-12-22 at 04 09 34