Unexpected token '<' at Loader.moduleStrategy
Asked Answered
P

0

6

I'm running a backend Express app and a React.JS app in one Docker container using PM2. My backend Nodejs Express app works fine, it's just the React app.

I had an initial error of: Cannot use import statement outside a module which I was able to fix by adding: "type": "module" to my package.json file. Which fixed that error but now I'm getting a new error of: Unexpected token '<' at Loader.moduleStrategy I'm assuming it's an ESLINT error. I'm using JavaScript, not TypeScript.

I have tried to install "babel-preset-react" as that apparently fixes this new error after a Google Search, but it did not work.

Prostration answered 22/11, 2021 at 20:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.