Describe the issue
When running the web version of the Expo app with the npx expo start --web --clear command, we are getting this error:
Web Bundling failed 2898ms src/app/index.ts (334 modules)
ERROR src/app/strict.css: Unexpected string
Expected behavior
Running npx expo start --web --clear should start the web app without errors.
Steps to reproduce
I'm using the code provided in the example Expo app
After installing the dependencies, the app should be ready to run.
When I run npx expo start --web --clear in the app root, this error occurs:
Web Bundling failed 2898ms src/app/index.ts (334 modules)
ERROR src/app/strict.css: Unexpected string
Test case
No response
Additional comments
Our index.js file contains this code:
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// Required for CSS to work on Expo Web.
import './strict.css';
// Required for Fast Refresh to work on Expo Web
import '@expo/metro-runtime';
import { registerRootComponent } from 'expo';
import { LogBox } from 'react-native';
import App from '../components/App';
if (LogBox != null) {
LogBox.ignoreLogs([
// /React Strict DOM: .*/,
// /Failed prop type: .*/,
]);
}
registerRootComponent(App);
Strict.css contains this code:
/* This directive is used by the react-strict-dom postcss plugin. */
/* It is automatically replaced with generated CSS during builds. */
@react-strict-dom;
Describe the issue
When running the web version of the Expo app with the
npx expo start --web --clearcommand, we are getting this error:Expected behavior
Running
npx expo start --web --clearshould start the web app without errors.Steps to reproduce
I'm using the code provided in the example Expo app
After installing the dependencies, the app should be ready to run.
When I run
npx expo start --web --clearin the app root, this error occurs:Test case
No response
Additional comments
Our
index.jsfile contains this code:Strict.css contains this code: