Categories
Development

Heroku Deployment Continues to Fail at “Pruning devDependencies” Step

I continue to have issues deploying to Heroku and I can’t find out what is going wrong for the life of me. The Heroku error log tells me this after it successfully builds my react app: —–> Caching build – node_modules —–> Pruning devDependencies npm ERR! Cannot read property ‘match’ of undefined Here is my […]

Categories
Development

Why is this React Typescript app throwing errors?

I just created a new React app using npx create-react-app my-app –template typescript and it was working fine until I changed my component to from a stateless one to a stateful one. The error: JSX element type ‘App’ is not a constructor function for JSX elements. TS2605 3 | import App from “./App”; 4 | […]

Categories
Development

“eslint: Permission denied” when deploying React app on Firebase through GitLab

I’m currently trying to setup CI through GitLab for my React app hosted on Firebase. I’m struggling to get past this point. There were some other post suggesting the use of sudo but the console told me the command was not found. Any help would be greatly appreciated. Thanks you. Here are my current configurations: […]

Categories
Development

“Error: Cannot find module” when deploy react app to elastic beanstalk

I am trying to deploy my create-react-app to an environment in my Elastic Beanstalk application but I get the error “Error: Cannot find module ‘../../context’”. The app works fine when I run local and I do not get an error on the EB deploy process, but when I open the app I get an error. […]

Categories
Development

Could not complete “npm run deploy” command for React to use on Github Pages

I’m trying to deploy a website on Github pages, and the project was created using create-react-app and has gh-pages module installed. All of my local and remote repositories are up to date, and using npm start launches the page on local host with no issues. However when I try to deploy this site to Github […]

Categories
Development

Flash happening using React-beautiful-dnd and Cloud Firestore

I am developing a react-application that uses Firebase(Cloud Firestore), Redux and React-beautiful-DnD. Here is gif image Whenever I move ToDo-Task to another column, a flash happening. I assume the reasons are for calling multiple requests to Cloud Firestore at once. Here is the code I use to request update() to Cloud Firestore. Note: I used […]

Categories
Development

How to fix JavaScript heap out of memory in react [closed]

Important Info: OS: Window 10 Pro Node V: 10.15.3 NPM V: 6.4.1 I have a React Theme. After doing npm install and npm start. I get an error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed – JavaScript heap out of memory 1: 00007FF64E89F04A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+5114 2: 00007FF64E87A0C6 node::MakeCallback+4518 3: 00007FF64E87AA30 node_module_register+2032 4: 00007FF64EB020EE v8::internal::FatalProcessOutOfMemory+846 […]

Categories
Development

Template not provided using create-react-app

When I type the create-react-app my-app command in my terminal, it appears to work – downloading all libraries successfully etc. At the end of that process however I get a message that a template was not provided. Input user@users-MacBook-Pro-2 Desktop% create-react-app my-app Output Creating a new React app in /Users/user/Desktop/my-app. Installing packages. This might take […]

Categories
Development

Using Jest with react-scripts (run via yarn), how do I get a full coverage report without having to pass watchAll flag?

I have a basic create-react-app setup called jest-playground-1 with a package.json file of { “name”: “jest-playground-1”, “version”: “0.1.0”, “private”: true, “dependencies”: { “@testing-library/dom”: “^6.10.1”, “@testing-library/jest-dom”: “^4.2.4”, “@testing-library/react”: “^9.3.3”, “@testing-library/user-event”: “^7.1.2”, “babel-jest”: “^24.9.0”, “react”: “^16.12.0”, “react-dom”: “^16.12.0”, “react-scripts”: “3.3.0” }, “scripts”: { “start”: “react-scripts start”, “build”: “react-scripts build”, “test”: “react-scripts test”, “eject”: “react-scripts eject” }, “eslintConfig”: […]