Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7074

npx react-native init fails with "SyntaxError: Unexpected token '?'"

$
0
0

I tried to create a React Native project using the following command:

npx react-native init myApp

but it fails with the following error:

/home/toufik/node_modules/@react-native-community/cli-doctor/build/commands/doctor.js:127    description: description ?? healthcheck.description,                              ^ SyntaxError: Unexpected token '?'at wrapSafe (internal/modules/cjs/loader.js:915:16)at Module._compile (internal/modules/cjs/loader.js:963:27)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)at Module.load (internal/modules/cjs/loader.js:863:32)at Function.Module._load (internal/modules/cjs/loader.js:708:14)at Module.require (internal/modules/cjs/loader.js:887:19)at require (internal/modules/cjs/helpers.js:74:18)at Object.<anonymous> (/home/toufik/node_modules/@react-native-community/cli-doctor/build/index.js:19:38)at Module._compile (internal/modules/cjs/loader.js:999:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

I installed NPM with the command sudo apt-get install npm and I think there shouldn't be any problem with this.

My environment:

  • NPM version: 8.5.1
  • Node.js version: 12.22.9
  • WSL Ubuntu

Viewing all articles
Browse latest Browse all 7074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>