question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to compile error when running dev react server

See original GitHub issue

Hello,

I am receiving the following error when i run npm run start in my react project.

Failed to compile. ./node_modules/reactfire/node_modules/rxfire/database/index.esm.js Attempted import error: '__spreadArray' is not exported from 'tslib'.

Here is my package.json dependencies "dependencies": { "@testing-library/jest-dom": "^5.11.9", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^12.8.3", "file-loader": "^6.2.0", "firebase": "^8.7.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-icons": "^4.2.0", "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", "reactfire": "^3.0.0-rc.2", "web-vitals": "^1.1.1" }

I have tried changing my reactfire version and also including a different version of rxfire in my package.json but nothing seems to help

Version info

React: 17.0.2 Firebase: 8.7.1 ReactFire: 3.0.0-rc.2 Other (e.g. Node, browser, operating system) (if applicable): Node: 14.17.3

Expected behavior

Should compile successfully.

Actual behavior

Compilation error when starting react server

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tigbeanscommented, Jul 17, 2021

@epodol the combination of deleting the node_modules folder and the package-lock.json seemed to do the trick. I had tried just deleting node_modules before but I guess the trick was deleting the package-lock.json too. Thanks 😃

1reaction
tandalesccommented, Jul 17, 2021

@epodol Thanks! This actually fixed my problem 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to compile error when running on dev server locally ...
Try another editor. If it helps then the problem is somehow in Atom. Create React App won't modify your source files by itself....
Read more >
React Js : Failed to Compile - javascript - Stack Overflow
So whenever i try to run a react project , I get a compile error stating : Failed to compile ./src/index. js Module...
Read more >
Why my React App Failed To Compile - Timonwa's Notes
Bugs and Errors will come in different shapes and sizes, styles and formats you never expect, causing your react app not to compile....
Read more >
A Fresh Create React App But always compiling with Error
So I have just excuted npx create-react-app my-app yet somehow when I run npm start I always get the following Error: Failed to...
Read more >
Eslint error causing create-react-app failed to compile-Reactjs
I assume that you have installed ESLint using npm install eslint --save-dev and defined a default configuration with node_modules/.bin/eslint --init ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found