title: Implement react-native-web, cant run Web on Mac
body: <p>Hi so i followed <a href="https://aureliomerenda.medium.com/create-a-native-web-app-with-react-native-web-419acac86b82" rel="nofollow noreferrer">this</a> page to implement react-native-web to my project now im stuck at <code>yarn run test</code>. There i get following error code:</p>
  <pre><code> FAIL  __tests__/App-test.js
    ● Test suite failed to run
  
      D:\Diplomarbeit\React\ChEdu\node_modules\@react-navigation\elements\lib\commonjs\assets\back-icon.png:1
      ({&quot;Object.&lt;anonymous&gt;&quot;:function(module,exports,require,__dirname,__filename,global,jest){�PNG
  
  
      SyntaxError: Invalid or unexpected token
  
        at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
        at Object.&lt;anonymous&gt; (node_modules/@react-navigation/elements/lib/commonjs/index.tsx:20:3)
  
  Test Suites: 1 failed, 1 total
  Tests:       0 total
  Snapshots:   0 total
  Time:        5.056 s
  Ran all test suites.
  </code></pre>
  <p>I tried to do it on Mac and on Windows, but in both ways i get an error.</p>
  <p>The Main Problem is that I cant run the Web on Mac, on Windows is everything fine but on Mac it isn't working:</p>
  <p>Safari:
  <a href="https://i.stack.imgur.com/w2akc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w2akc.png" alt="enter image description here" /></a></p>
  <p>Terminal in Visual Studio Code:
  <a href="https://i.stack.imgur.com/duwkw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/duwkw.png" alt="enter image description here" /></a></p>
  <blockquote>
  <p>My code:</p>
  </blockquote>
  <pre><code>public/index.html    
  &lt;!DOCTYPE html&gt;
      &lt;html lang=&quot;en&quot;&gt;
      
          &lt;head&gt;
              &lt;meta charset=&quot;utf-8&quot;&gt;
              &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;
              &lt;meta name=&quot;theme-color&quot; content=&quot;#000000&quot;&gt;
              &lt;title&gt;React App&lt;/title&gt;
          &lt;/head&gt;
      
          &lt;body&gt;
              &lt;noscript&gt;
                  You need to enable JavaScript to run this app.
              &lt;/noscript&gt;
              &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;
          &lt;/body&gt;
      
      &lt;/html&gt;
  
  index.native.js
  
      /**
       * @format
       */
      
      import {AppRegistry} from 'react-native';
      import App from './src/App';
      import {name as appName} from './src/app.json';
      
      AppRegistry.registerComponent(appName, () =&gt; App);
  
  src/App.js
  
      import * as React from 'react';
      import { NavigationContainer } from '@react-navigation/native';
      import { createNativeStackNavigator } from '@react-navigation/native-stack';
      
      import HomeScreen from '../Pages/Home';
      import IntroScreen from '../Pages/Intro';
      import MainView from '../Pages/MainView';
      
      const Stack = createNativeStackNavigator();
      
      const MyStack = () =&gt; {
        return (
          &lt;NavigationContainer&gt;
            &lt;Stack.Navigator&gt;
              &lt;Stack.Screen
                name=&quot;Home&quot;
                component={HomeScreen}
                options={{ title: 'ChEdu' }}
              /&gt;
              &lt;Stack.Screen name=&quot;Intro&quot; component={IntroScreen} /&gt;
              &lt;Stack.Screen name=&quot;MainView&quot; component={MainView} /&gt;
            &lt;/Stack.Navigator&gt;
          &lt;/NavigationContainer&gt;
        );
      };
      
      
      export default MyStack;
  
  src/index.js
  
      /**
       * @format
       */
      
      import {AppRegistry} from 'react-native';
      import App from './App';
      import {name as appName} from './app.json';
      
      AppRegistry.registerComponent(appName, () =&gt; App);
      AppRegistry.runApplication(appName, {
          rootTag: document.getElementById('root'),
      });
  
  index.native.js
  
      /**
       * @format
       */
      
      import {AppRegistry} from 'react-native';
      import App from './src/App';
      import {name as appName} from './src/app.json';
      
      AppRegistry.registerComponent(appName, () =&gt; App);
  
  __tests__/App-test.js
  
      /**
       * @format
       */
      
      import 'react-native';
      import React from 'react';
      import App from '../src/App';
      
      // Note: test renderer must be required after react-native.
      import renderer from 'react-test-renderer';
      
      it('renders correctly', () =&gt; {
        renderer.create(&lt;App /&gt;);
      });
  
  </code></pre>
  <p>Tree:
  <a href="https://i.stack.imgur.com/zWCGC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zWCGC.png" alt="Tree:" /></a></p>