react build failed, The 'compilation' argument must be an instance of Compilation - node.js

npm start is working fine but when I am trying to build with npm run build, compilation failed with this error
Creating an optimized production build...
Failed to compile.
The 'compilation' argument must be an instance of Compilation
package.json
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"#nivo/radar": "^0.62.0",
"#stripe/react-stripe-js": "^1.7.0",
"#stripe/stripe-js": "^1.22.0",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"#types/jest": "^24.9.1",
"#types/node": "^12.12.47",
"#types/react": "16.9.23",
"#types/react-bootstrap": "^0.32.28",
"#types/react-dom": "16.9.8",
"#types/react-router-dom": "^5.1.5",
"#types/uuid": "^8.0.0",
"antd": "^4.4.0",
"availity-reactstrap-validation": "^2.7.1",
"awesome-typescript-loader": "^5.2.1",
"axios": "^0.19.2",
"bootstrap": "^5.1.3",
"classnames": "^2.2.6",
"customize-cra": "^1.0.0",
"feather-icons-react": "^0.4.3",
"js-cookie": "^2.2.1",
"less": "^3.11.3",
"less-loader": "^6.2.0",
"lodash": "^4.17.20",
"mini-css-extract-plugin": "^2.4.5",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
"mobx-react-lite": "^2.0.7",
"moment": "^2.27.0",
"react": "16.13.1",
"react-app-rewired": "^2.1.6",
"react-countup": "^4.3.3",
"react-device-detect": "^1.13.1",
"react-dom": "16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.0",
"react-svg": "^11.0.29",
"reactstrap": "^9.0.1",
"recharts": "^1.8.5",
"sass": "^1.45.0",
"source-map-loader": "^3.0.0",
"tar": "^6.1.11",
"typescript": "^3.7.5",
"uuid": "^8.2.0"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^3.5.0",
"#typescript-eslint/parser": "^3.5.0",
"babel-plugin-import": "^1.13.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-react": "^1.1.7",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.0.5"
},
"resolutions": {
"**/react": "16.9.0",
"**/react-dom": "16.9.0"
}
}
I am using Typescript
node version: v16.13.1
npm version: 8.1.2

Related

React app taking too long to start the development server

I am using a react dashboard template from themeforest. Here is the package.json content:
{
"name": "acorn-react",
"version": "1.0.1",
"private": true,
"proxy": "http://localhost:3000",
"dependencies": {
"#emoji-mart/data": "^1.0.2",
"#fullcalendar/bootstrap": "^5.9.0",
"#fullcalendar/daygrid": "^5.9.0",
"#fullcalendar/interaction": "^5.9.0",
"#fullcalendar/react": "^5.9.0",
"#fullcalendar/timegrid": "^5.9.0",
"#glidejs/glide": "^3.4.1",
"#reduxjs/toolkit": "^1.6.0",
"#testing-library/jest-dom": "^5.13.0",
"#testing-library/react": "^11.2.7",
"#testing-library/user-event": "^13.1.9",
"#yaireo/tagify": "^4.12.0",
"autosuggest-trie": "^2.1.1",
"axios": "^0.21.1",
"axios-mock-adapter": "^1.19.0",
"chart.js": "^3.5.1",
"chartjs-adapter-luxon": "^1.0.0",
"chartjs-plugin-crosshair": "^1.2.0",
"chartjs-plugin-datalabels": "^2.0.0",
"chartjs-plugin-streaming": "^2.0.0",
"clamp-js": "^0.7.0",
"classnames": "^2.3.1",
"date-fns": "^2.22.1",
"emoji-mart": "3.0",
"formik": "^2.2.9",
"fuse.js": "^6.4.6",
"intro.js": "^4.2.2",
"intro.js-react": "^0.5.0",
"luxon": "^2.0.1",
"overlayscrollbars": "^1.13.1",
"overlayscrollbars-react": "^0.2.3",
"pixabay-api": "^1.0.4",
"plyr-react": "^3.0.8",
"quill": "^1.3.7",
"rc-slider": "^9.7.2",
"react": "^16.13.0",
"react-autosuggest": "^10.1.0",
"react-bootstrap": "^2.0.0-rc.0",
"react-circular-progressbar": "^2.0.4",
"react-contexify": "^5.0.0",
"react-countdown": "^2.3.2",
"react-datepicker": "^4.1.1",
"react-datetime": "^3.1.1",
"react-dom": "^16.13.0",
"react-dropzone-uploader": "^2.11.0",
"react-flow-renderer": "^9.6.2",
"react-fuzzy-highlighter": "^1.0.0",
"react-helmet": "^6.1.0",
"react-hook-mousetrap": "^2.0.4",
"react-image-lightbox": "^5.1.4",
"react-intl": "^5.20.2",
"react-masonry-css": "^1.0.16",
"react-number-format": "^4.6.4",
"react-paginate": "^8.1.3",
"react-rating": "^2.0.5",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-select": "^4.3.1",
"react-simple-maps": "^3.0.0",
"react-slick": "^0.29.0",
"react-sortablejs": "^6.0.0",
"react-syntax-highlighter": "^15.4.4",
"react-table": "^7.7.0",
"react-tag-autocomplete": "^6.2.0",
"react-tenor": "^2.2.0",
"react-toastify": "^7.0.4",
"react-tooltip": "^4.2.21",
"react-world-flags": "^1.5.0",
"redux-undo": "^1.0.1",
"reduxjs-toolkit-persist": "^7.0.1",
"slick-carousel": "^1.8.1",
"sortablejs": "^1.14.0",
"web-vitals": "^0.2.4",
"yup": "^0.32.9"
},
"scripts": {
"start-js": "react-scripts start --dev",
"start-css": "sass --style=compressed --watch
src/sass/styles.scss:public/css/styles.css",
"start": "concurrently \"npm run start-js\" \"npm run start-css\"",
"build-js": "react-scripts build --prod",
"build-css": "sass --style=compressed --no-source-map
src/sass/styles.scss:public/css/styles.css",
"build": "concurrently \"npm run build-css\" \"npm run build-js\"",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint ./src/**/*.js",
"lint:fix": "eslint ./src --fix",
"precommit": "lint-staged",
"concurrently": "concurrently"
},
"eslintConfig": {
"extends": [
"react-app"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write",
"git add"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#babel/core": "^7.18.2",
"#babel/preset-env": "^7.18.2",
"#babel/preset-react": "^7.17.12",
"babel-loader": "^8.1.0",
"babel-plugin-module-resolver": "^4.1.0",
"concurrently": "^6.2.0",
"eslint": "^7.28.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
"prettier": "2.3.1",
"sass": "^1.42.1"
}
}
After I run npm start, it takes about a minute or two until I see Starting the development server and localhost starts loading in browser. And then it takes about 30 minutes until the page is loaded. (Yes 30 minutes!) . I know that the list of dependency is quite long but still I expect it to start in maximum 5 minutes. I have searched a lot for similar issues and tried to apply the suggested solutions:
Allocated more memory: --max_old_space_size=4096
Updated nodejs and npm
Closed all browser tabs before starting the app
Notes:
When I ran npm install there were dependency errors, so I had to do npm install --force
I am running this on Windows 10 , my pc has 8GB of RAM.
Thanks to everyone who will help!
I think the problem is not with the package.json. the problem is you have something that makes it slower, which is the package prettier, the same thing happened to me, the problem was the prettier package that made my app slow by taking too much time in analyzing the format and makes the format better according to the language, so this process takes times, having too much files and prettier checks all of the file again and again, the more files you have the more time it will take. So i recommend removing prettier. You can just download a vscode extension of prettier that does the job better.

How do I resolve this dependency conflict from when doing npm link

When I do npm link like this in Window 10:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react
In my app when I do import { useSnackbar } from 'notistack'; then I can use the notistack ok, and it's the global notistack. I want to modify it debug it locally so I forked it and did the npm link but when I npm start the the App get the "You might have more than one copy of React in the same app " error. I also test this and it's true so that's why I do the npm link react and it's also recommended so I don't know what I do wrong here
To be able to debug notistack in VSCode and use the notistack in my app in VSCode. I do npm link. I get the Duplicate React error so must npm link the App react version and tell notistack to us the app react.
But I get this error: I do this npm link on other library's without problem but now this error:
I have tried to fixed this but it's not working.
I also do:
L:\git\notistack> npm link L:\react\Greta100Weeks\greta100weeks\node_modules\react-dom
And that is resolving ok.
I fork the notistack library and is using it ok in the app but only when I do npm link it fails. What is the problem here I guess it's in the package.json
Here is the package.json for the forked library notistack:
{
"name": "notistack",
"version": "1.0.10",
"description": "Highly customizable notification snackbars (toasts) that can be stacked on top of each other",
"main": "dist/index.js",
"module": "dist/notistack.esm.js",
"types": "dist/index.d.ts",
"license": "MIT",
"author": {
"name": "Hossein Dehnokhalaji",
"email": "hossein.dehnavi98#yahoo.com",
"url": "https://github.com/iamhosseindhv/notistack"
},
"homepage": "https://www.iamhosseindhv.com/notistack",
"repository": {
"url": "git+https://github.com/iamhosseindhv/notistack.git",
"type": "git"
},
"scripts": {
"build": "tsdx build --transpileOnly --entry ./src/index.js",
"prebuild": "npm run docs",
"prepublishOnly": "npm run build",
"docs": "rimraf typedoc.json && typedoc --tsconfig",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"peerDependencies": {
"#material-ui/core": "^4.11.2",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
},
"devDependencies": {
"#babel/preset-react": "^7.8.3",
"#material-ui/core": "^4.9.5",
"#types/node": "^13.9.0",
"#types/react": "^16.9.23",
"#types/react-dom": "^16.9.5",
"#types/react-is": "^16.7.1",
"#typescript-eslint/eslint-plugin": "^3.9.1",
"#typescript-eslint/parser": "^3.9.1",
"babel-plugin-optimize-clsx": "^2.6.1",
"eslint": "^7.7.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.20.6",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0",
"rimraf": "^3.0.2",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-copy": "^3.3.0",
"tsdx": "^0.13.2",
"typedoc": "^0.16.11",
"typescript": "^3.8.3"
},
"dependencies": {
"clsx": "^1.1.0",
"hoist-non-react-statics": "^3.3.0"
},
"bugs": {
"url": "https://github.com/iamhosseindhv/notistack/issues"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/notistack"
},
"contributors": [
"Hossein Dehnokhalaji (https://www.iamhosseindhv.com/)"
],
"keywords": [
"notistack",
"enqueueSnackbar",
"snackbarprovider",
"useSnackbar",
"multiple",
"react",
"javascript",
"material-ui",
"toast",
"redux",
"snackbar",
"stacked",
"notification",
"material design",
"hossein",
"dehnokhalaji",
"iamhosseindhv"
]
}
Here is the package.json for the app using the library:
{
"name": "greta-thunberg-fff",
"version": "1.2.9",
"private": true,
"homepage": "https://greta.portplays.com",
"main": "index.js",
"module": "dist/index.js",
"files": [
"dist",
"README.md"
],
"dependencies": {
"#material-ui/core": "^4.11.2",
"#material-ui/icons": "^4.11.2",
"#material-ui/lab": "^4.0.0-alpha.57",
"#material-ui/styles": "^4.11.2",
"axios": "^0.19.2",
"bootstrap": "^4.5.2",
"change-case": "^4.1.2",
"classnames": "^2.3.1",
"clean-tag": "^3.1.1",
"clsx": "^1.1.1",
"comma-separated-values": "^3.6.4",
"crypto-js": "^4.0.0",
"date-fns": "^2.23.0",
"faker": "^5.5.3",
"firebase": "^7.23.0",
"formik": "^2.2.5",
"framer-motion": "^2.9.5",
"gsap": "^3.5.1",
"history": "^5.0.0",
"i": "^0.3.6",
"lodash": "^4.17.19",
"lodash.debounce": "^4.0.8",
"mammoth": "^1.4.11",
"material-table": "^1.69.2",
"moment": "^2.27.0",
"normalize-wheel": "^1.0.1",
"notistack": "^1.0.10",
"npm": "^7.11.2",
"pdfjs-dist": "^1.8.357",
"preval.macro": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-activity": "^1.2.2",
"react-bootstrap": "^1.3.0",
"react-chartjs-2": "^2.11.1",
"react-data-grid": "^6.1.0",
"react-detect-offline": "^2.4.0",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.4",
"react-helmet": "^6.1.0",
"react-motion": "^0.5.2",
"react-perfect-scrollbar": "^1.5.8",
"react-redux": "^7.2.5",
"react-resize-detector": "^5.0.7",
"react-router": "^6.0.0-beta.4",
"react-router-dom": "^6.0.0-beta.4",
"react-scripts": "^3.4.0",
"react-slick": "^0.27.3",
"react-spring": "^8.0.27",
"react-transition-group": "^4.4.1",
"react-visibility-sensor": "^5.1.1",
"rebass": "^4.0.7",
"recompose": "^0.30.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"sass": "^1.41.1",
"simplebar-react": "^2.3.5",
"slick-carousel": "^1.8.1",
"styled-components": "^5.1.1",
"styled-system": "^5.1.5",
"three": "^0.85.2",
"typescript": "^3.9.7",
"uuid": "^8.3.1",
"xlsx": "^0.10.1",
"yup": "^0.32.1"
},
"scripts": {
"start": "set PORT=6545&& react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -b master -d build"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"#typescript-eslint/eslint-plugin": "^4.1.1",
"#typescript-eslint/parser": "^4.1.1",
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"clean-tag": "^3.1.1",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-hooks": "^4.1.2",
"gh-pages": "^2.0.1",
"prettier": "^2.1.1",
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-scripts": "^3.4.3",
"rebass": "^4.0.7",
"styled-system": "^5.1.5"
}
}

Module not found: Can't resolve 'react/lib/React' in 'C:\Users\name\ecom\node_modules\react-dom\lib'

I was working on a react project and suddenly this error occurred saying,
Failed to compile
../node_modules/react-dom/lib/ReactMount.js
Module not found: Can't resolve 'react/lib/React' in 'C:\Users\Angelin\ecom\node_modules\react-dom\lib'
package.json:
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"#ant-design/icons": "^4.0.0",
"#testing-library/jest-dom": "^5.11.9",
"#testing-library/react": "^11.2.3",
"#testing-library/user-event": "^12.6.2",
"antd": "^4.11.2",
"axios": "^0.21.1",
"firebase": "^8.2.5",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-toastify": "^7.0.2",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"body-parser": "^1.19.0",
"bootstrap": "^4.6.0",
"cloudinary": "^1.25.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-jwt": "^6.0.0",
"firebase-admin": "^9.4.2",
"jsonwebtoken": "^8.5.1",
"mongoose": "^5.11.14",
"morgan": "^1.10.0",
"multiscroll-reactjs": "^1.0.2",
"nodemon": "^2.0.7",
"react-awesome-button": "^6.5.1",
"react-bootstrap": "^1.5.2",
"react-device-detect": "^1.17.0",
"react-image-file-resizer": "^0.4.2",
"react-multi-carousel": "^2.6.2",
"react-responsive-carousel": "^3.2.13",
"react-star-ratings": "^2.3.0",
"slugify": "^1.4.6",
"typewriter-effect": "^2.17.0",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Please let me know what I should do
This seems to be a problem of installation of packages at first glance.
You can try removing node_modules folder and install all packages again with npm install or yarn install.
If this does not work then you can refer this post

Node.js : my server request hot-update.js when I try to launch my application

I have a weird error since today, for no apparent reasons, i get this message in the back-end terminal whenever I try to launch my back-end and front-end :
"GET /main.e4d789223cfc4d592f75.hot-update.js 404 3.707 ms - 289"
It just loops indefinitely and I can't access my app anymore.
Weirdly also, it worked completely fine before, and it appeared without me touching anything in npm, proxys or back-end.
I tried to look up online but there are no useful answers.
Here My package.json server-side
{
"name": "workfromhome",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www",
"heroku-postbuild": "cd reactapp && npm install && npm run build"
},
"dependencies": {
"cloudinary": "^1.23.0",
"cookie-parser": "~1.4.4",
"crypto-js": "^4.0.0",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"ejs": "~2.6.1",
"express": "~4.16.1",
"express-fileupload": "^1.2.0",
"force-ssl-heroku": "^1.0.2",
"http-errors": "~1.6.3",
"mongoose": "^5.10.13",
"morgan": "~1.9.1",
"node-mailjet": "^3.3.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"reactstrap": "^8.7.1",
"stripe": "^8.122.1",
"sync-request": "^6.1.0",
"uid2": "0.0.3"
}
}
And my package.json front
"name": "reactapp",
"version": "0.1.0",
"private": true,
"dependencies": {
"#ant-design/colors": "^5.0.0",
"#ckeditor/ckeditor5-build-classic": "^23.1.0",
"#ckeditor/ckeditor5-react": "^3.0.0",
"#craco/craco": "^5.8.0",
"#fortawesome/fontawesome-svg-core": "^1.2.32",
"#fortawesome/free-solid-svg-icons": "^5.15.1",
"#fortawesome/react-fontawesome": "^0.1.12",
"#stripe/stripe-js": "^1.11.0",
"#testing-library/jest-dom": "^5.11.5",
"#testing-library/react": "^11.1.1",
"#testing-library/user-event": "^12.2.0",
"antd": "^4.8.2",
"aos": "^2.3.4",
"cloudinary": "^1.23.0",
"craco-less": "^1.17.0",
"less": "^3.12.2",
"less-loader": "^7.1.0",
"node-fetch": "^2.6.1",
"puppeteer": "^5.5.0",
"react": "^17.0.1",
"react-animated-css": "^1.2.1",
"react-dom": "^17.0.1",
"react-html-parser": "^2.0.2",
"react-loader-spinner": "^3.1.14",
"react-redux": "^7.2.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"react-slick": "^0.27.13",
"react-sticky": "^6.0.3",
"react-sticky-box": "^0.9.3",
"react-typical": "^0.1.3",
"redux": "^4.0.5",
"slick-carousel": "^1.8.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject"
},
"proxy": "http://localhost:3000/",
"secure": false,
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Ok, its working now. I just restarted Visual Studio. Thank you

Unable to deploy in ec2 Ubuntu MERN stack

I'm attempting to deploy my MERN stack on an ec2 Ubuntu instance. Everything worked until I installed my project dependencies. My project worked fine in my local but for some reason, I can't fix the dependency issue in the instance (prod):
sudo yarn build
yarn run v1.22.5
$ react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to load plugin 'flowtype' declared in 'package.json ยป eslint-config-react-app': Cannot find module 'eslint/lib/rules/no-unused-expressions'
Require stack:
- /var/www/ubunturadiumlaw/node_modules/eslint-plugin-flowtype/dist/rules/noUnusedExpressions.js
- /var/www/ubunturadiumlaw/node_modules/eslint-plugin-flowtype/dist/index.js
- /var/www/ubunturadiumlaw/node_modules/#eslint/eslintrc/lib/config-array-factory.js
- /var/www/ubunturadiumlaw/node_modules/#eslint/eslintrc/lib/index.js
- /var/www/ubunturadiumlaw/node_modules/react-scripts/node_modules/eslint/lib/cli-engine/cli-engine.js
- /var/www/ubunturadiumlaw/node_modules/react-scripts/node_modules/eslint/lib/cli-engine/index.js
- /var/www/ubunturadiumlaw/node_modules/react-scripts/node_modules/eslint/lib/api.js
- /var/www/ubunturadiumlaw/node_modules/eslint-webpack-plugin/dist/getESLint.js
- /var/www/ubunturadiumlaw/node_modules/eslint-webpack-plugin/dist/linter.js
- /var/www/ubunturadiumlaw/node_modules/eslint-webpack-plugin/dist/index.js
- /var/www/ubunturadiumlaw/node_modules/eslint-webpack-plugin/dist/cjs.js
- /var/www/ubunturadiumlaw/node_modules/react-scripts/config/webpack.config.js
- /var/www/ubunturadiumlaw/node_modules/react-scripts/scripts/build.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I tried to install the dependency individually, with npm, with yarn, and apt-get nothing worked.
Here's my package.json file:
"version": "0.1.0",
"private": true,
"dependencies": {
"#fortawesome/fontawesome-free": "^5.15.1",
"#popperjs/core": "^2.5.3",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"algoliasearch": "^4.5.1",
"algoliasearch-helper": "^3.2.2",
"axios": "^0.19.2",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"bootstrap": "^4.5.3",
"brew": "0.0.8",
"compression": "^1.7.4",
"cors": "^2.8.5",
"crypto": "^1.0.1",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-react": "^7.21.5",
"express": "^4.17.1",
"file-system": "^2.2.2",
"flowtype": "^2.0.0",
"git": "^0.1.5",
"gridfs-stream": "^1.1.1",
"helmet": "^4.1.1",
"https-localhost": "^4.6.3",
"instantsearch.css": "^7.4.5",
"jquery": "^3.5.1",
"method-override": "^3.0.0",
"mongodb": "^3.5.9",
"mongoose": "^5.9.20",
"multer": "^1.4.2",
"multer-gridfs-storage": "^4.2.0",
"node-json-db": "^1.1.0",
"node-sass": "^4.14.1",
"nodemon": "^2.0.4",
"popper.js": "^1.16.1",
"react": "^17.0.1",
"react-autosuggest": "^10.0.2",
"react-bootstrap": "^1.3.0",
"react-create-app": "^2.0.6",
"react-dom": "^17.0.1",
"react-instantsearch-dom": "^6.7.0",
"react-router-dom": "^5.1.2",
"react-scripts": "4.0.0",
"react-tappable": "^1.0.4",
"react-toastify": "^6.0.4",
"rfs": "^9.0.3",
"serve": "^11.3.2",
"typescript": "^4.0.5",
"web-vitals": "^0.2.4",
"yarn": "^1.22.10"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}, "eslintConfig": {
"extends": [
"react-app"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
What is wrong?
Ec2 Ubuntu 20.04
Using Node.js as Server
React
Mongo

Resources