React App Error: Cannot find module 'react-error-overlay/middleware' - reactjs

This is very frustrating. I've been dealing with this issue since yesterday morning. I have a React application I have not started up in over a year. This application ran perfectly last time I started it up. But I want to work on it locally, and using the exact same package.json when it ran just fine a year ago, is failed in the browser with the following error message:
TypeError: Cannot read property 'ReactCurrentOwner' of undefined
Since the package.json was a year old, today I ran npm update and when I try and run the program I receive the following error:
Error: Cannot find module 'react-error-overlay/middleware'
Old package.json
{
"name": "mazzo-react-test",
"version": "0.1.0",
"private": true,
"dependencies": {
"auth0-lock": "^10.24.3",
"autoprefixer": "7.1.2",
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.1",
"babel-preset-react-app": "^3.1.2",
"babel-runtime": "6.23.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "^1.1.3",
"css-loader": "0.28.4",
"dotenv": "4.0.0",
"eslint": "4.4.1",
"eslint-config-react-app": "^2.1.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"konva": "^1.7.6",
"material-ui": "^0.18.7",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"react": "^15.6.2",
"react-dev-utils": "^3.1.3",
"react-dom": "^15.6.2",
"react-error-overlay": "^1.0.10",
"react-konva": "^1.7.16",
"react-relay": "0.10.0",
"react-relay-network-layer": "1.3.9",
"react-router": "3.0.2",
"react-router-relay": "0.13.5",
"react-tap-event-plugin": "^2.0.1",
"relay-commit-mutation-promise": "^1.0.1",
"style-loader": "0.18.2",
"styled-components": "^2.4.1",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.5.9",
"webpack": "3.5.1",
"webpack-dev-server": "2.7.1",
"webpack-manifest-plugin": "1.2.1",
"whatwg-fetch": "2.0.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "GRAPHQL_ENDPOINT=https://api.graph.cool/relay/v1/cj63i9kajpzhw0153segab1wa node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.js?(x)",
"<rootDir>/src/**/?(*.)(spec|test).js?(x)"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"js",
"json",
"web.jsx",
"jsx",
"node"
]
},
"babel": {
"plugins": [
"react-relay"
],
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"babel-plugin-react-relay": "^0.10.0"
}
}
New or updated package.json
{
"name": "mazzo-react-test",
"version": "0.1.0",
"private": true,
"dependencies": {
"auth0-lock": "^11.14.0",
"autoprefixer": "9.4.7",
"babel-core": "6.26.3",
"babel-eslint": "10.0.1",
"babel-jest": "24.1.0",
"babel-loader": "8.0.5",
"babel-preset-react-app": "^7.0.1",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"chalk": "^2.4.2",
"css-loader": "2.1.0",
"dotenv": "6.2.0",
"eslint": "5.14.0",
"eslint-config-react-app": "^3.0.7",
"eslint-loader": "2.1.2",
"eslint-plugin-flowtype": "3.4.2",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"html-webpack-plugin": "3.2.0",
"jest": "24.1.0",
"konva": "^2.6.0",
"material-ui": "^0.20.2",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"promise": "8.0.2",
"react": "^16.8.2",
"react-dev-utils": "^7.0.3",
"react-dom": "^16.8.2",
"react-error-overlay": "^5.1.3",
"react-konva": "^16.8.2-0",
"react-relay": "2.0.0",
"react-relay-network-layer": "2.2.1",
"react-router": "4.3.1",
"react-router-relay": "0.14.0",
"react-tap-event-plugin": "^3.0.3",
"relay-commit-mutation-promise": "^1.0.0",
"style-loader": "0.23.1",
"styled-components": "^4.1.3",
"sw-precache-webpack-plugin": "0.11.5",
"url-loader": "1.1.2",
"webpack": "4.29.5",
"webpack-dev-server": "3.1.14",
"webpack-manifest-plugin": "2.0.4",
"whatwg-fetch": "3.0.0"
},
"scripts": {
"start": "node scripts/start.js",
"build": "GRAPHQL_ENDPOINT=https://api.graph.cool/relay/v1/cj63i9kajpzhw0153segab1wa node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.js?(x)",
"<rootDir>/src/**/?(*.)(spec|test).js?(x)"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"js",
"json",
"web.jsx",
"jsx",
"node"
]
},
"babel": {
"plugins": [
"react-relay"
],
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"babel-plugin-react-relay": "^0.10.0"
}
}
Why?

So what you're running into is the way that npm modules work - this issue that you're having isn't exclusive to react. We can't be expected to solve this for you - but I can try to point you in the right direction.
I'll use the dependency in your package.json as an example, the line:
"react-error-overlay": "^1.0.10" has a caret (^) next to the version number.
This means when you run npm install in most cases, or npm update then npm will go grab the most recent version of that package, above that version number.
If you compare the two different package.json files in your post you will notice that there are multiple major package versions skipped for quite a few of your dependencies. If you look up semantic versioning you'll find that a major version bump usually is due to a breaking change in the module.
E.g:
Old: "react-error-overlay": "^1.0.10"
New: "react-error-overlay": "^5.1.3"
In here you are jumping from major version 1.x.x to 5.x.x. That is over 4 breaking changes for just this module alone.
Basically, this means that the module does not work in the same way it did before. If you project worked a year or so ago - and you ran npm update - it most likely will fail now as you're pulling in new major package versions.
If you just want your project to work as it did before, here is what I recommend:
Take the original version of your package.json and remove the ^ carets in the version numbers.
Then clear out your node_modules folder in your project.
Then run npm install.
This should pull in the module versions very similar to what you were working with before. Try and see if it runs then. If it does, update your dependencies individually from there - and find which major version bumps cause your project to break.
Also:
As for the typeError you are getting - it stems from react-konva as noted in this issue thread:
https://github.com/konvajs/react-konva/issues/147#issuecomment-346217504
react-konva above version 1.1.6 is for react v16 and above
Target react v15 by using the version:
"react-konva": "1.1.6"

Related

React App Not Loading into The Packaged Electron App

I'm trying to package my react app with electron 8. I've followed the instructions in this article and made the necessary changes to suit my code:
https://medium.com/#johndyer24/building-a-production-electron-create-react-app-application-with-shared-code-using-electron-builder-c1f70f0e2649
Here's what I'm currently seeing after packaging.
Here's my package.json
{
"homepage": "./",
"name": "Asset_Viewer",
"version": "0.1.0",
"private": true,
"dependencies": {
"#babel/core": "7.9.0",
"#svgr/webpack": "4.3.3",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"#typescript-eslint/eslint-plugin": "^2.10.0",
"#typescript-eslint/parser": "^2.10.0",
"babel-eslint": "10.1.0",
"babel-jest": "^24.9.0",
"babel-loader": "8.1.0",
"babel-plugin-named-asset-import": "^0.3.6",
"babel-preset-react-app": "^9.1.2",
"bootstrap": "^4.5.2",
"camelcase": "^5.3.1",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"concurrently": "^5.2.0",
"cross-env": "^7.0.2",
"css-loader": "3.4.2",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"electron-is-dev": "^1.2.0",
"eslint": "^6.6.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "3.0.3",
"eslint-plugin-flowtype": "4.6.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "4.3.0",
"fs-extra": "^8.1.0",
"html-webpack-plugin": "4.0.0-beta.11",
"identity-obj-proxy": "3.0.0",
"jest": "24.9.0",
"jest-environment-jsdom-fourteen": "1.0.1",
"jest-resolve": "24.9.0",
"jest-watch-typeahead": "0.4.2",
"mini-css-extract-plugin": "0.9.0",
"node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.6.4",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-bootstrap": "^1.3.0",
"react-dev-utils": "^10.2.1",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.1",
"resolve": "1.15.0",
"resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2",
"semver": "6.3.0",
"shelljs": "^0.8.4",
"sqlite3": "^5.0.0",
"style-loader": "0.23.1",
"terser-webpack-plugin": "2.3.5",
"ts-pnp": "1.1.6",
"url-loader": "2.3.0",
"wait-on": "^5.0.0",
"webpack": "4.42.0",
"webpack-dev-server": "3.10.3",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"build-electron": "mkdir build\\src > nul & robocopy src\\shared build\\src\\shared /s > nul & robocopy electron build\\electron /s > nul || exit 0",
"electron-dev": "concurrently \"cross-env BROWSER=none npm run start\" \"wait-on http://localhost:3000 && electron .\"",
"eject": "react-scripts eject",
"electron-pack": "electron-builder -c.extraMetadata.main=build/electron.js",
"preelectron-pack": "npm run build"
},
"build": {
"appId": "com.icom.icomuav",
"files": [
"build/**/*",
"node_modules/**/*"
],
"directories": {
"buildResources": "assets"
}
},
"main": "public/electron.js",
"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": {
"style-loader": "^1.2.1",
"electron": "^8.2.5",
"electron-builder": "^22.6.0"
},
"jest": {
"roots": [
"<rootDir>/src"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [
"<rootDir>/src/setupTests.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "jest-environment-jsdom-fourteen",
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
"modulePaths": [],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
},
"babel": {
"presets": [
"react-app"
]
}
}
Basically this are the order which I run the scripts to package the whole thing.
build
build-electron
electron-pack
Any help would be appreciated. Thanks!
I know that I'm late to this, but I spent days tracking this issue down.
I ran npm run build first to package my react application so that i would actually have a build folder.
In my case, after using electron-forge to package my application, inside index.html all of my local imports to my .js files were missing the '.' before "/static/js/etc.js".
example:
example 2:
once changing it to the correct one as shown, it loaded everything just fine:
I really hope this helps someone.
I would suggest you to log the current route to the console, so you can see what page is loaded when you open both the development and the production build.
It might be caused by the router. In your project you probably have only 1 real HTML page - index.html, so make sure it loads /index.html and not /index.html/# (hash mode) or something.
Also try to add this event listener in your main process:
// Replace YOUR_WINDOW and modify the line that loads the URL
// (the same way you load URL when the window is created)
YOUR_WINDOW.webContents.on('did-fail-load', () => {
if (process.env.NODE_ENV === 'production') {
YOUR_WINDOW.loadURL('app://./index.html')
}
})
This can be fixed with chrome settings.
Please try to uncheck maps settings in Developer Tools Settings, and then refresh chrome.
uncheck Enable JavaScript source maps
uncheck Enable CSS source maps

CSS Loader has been initialized using an options object that does not match the API schema

Error: Module build failed: ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
options has an unknown property 'localIdentName'. These properties are valid:
object { url?, import?, modules?, icss?, sourceMap?, importLoaders?, esModule? }
below is the package.json file of my create-react-app
please help me find the error.
{
"name": "burger-project",
"version": "0.1.0",
"private": true,
"dependencies": {
"autoprefixer": "7.1.6",
"axios": "^0.19.2",
"babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "^26.3.0",
"babel-loader": "7.1.2",
"babel-preset-react-app": "^3.1.2",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"dotenv": "4.0.0",
"dotenv-expand": "4.2.0",
"eslint": "4.10.0",
"eslint-config-react-app": "^2.1.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "^26.4.2",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.7.2",
"raf": "3.4.0",
"react": "^16.13.1",
"react-dev-utils": "^5.0.2",
"react-dom": "^16.13.1",
"react-redux": "^7.2.1",
"react-router-dom": "^5.2.0",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.3.0",
"resolve": "1.6.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.6.2",
"webpack-dev-server": "^2.7.1",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"js",
"json",
"web.jsx",
"jsx",
"node",
"mjs"
]
},
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
},
"devDependencies": {
"babel-plugin-add-module-exports": "^1.0.2",
"css-loader": "^3.1.0",
"webpack": "^3.0.0"
}
}

Noob question: How can I turn my create-react-app into a standalone offline video game .exe program that does not require anything else to run?

I'm making a video game with create-react-app and typescript. I've tried distributing with electron but it is such a mess and I'm totally lost. I've put so much effort on this game that I really need to make a proper .exe build for, and now that I want to make a build I'm totally lost and helpless.
Also, there are some stuff I need to be able to do:
I need to be able to change resolution from the .tsx files
I need to be able to toggle fullscreen from the .tsx files
I need to be able to load assets located in /src
Everything needs to run locally and even offline
I need my public folder to be trully accessible and moddable for the end user
I can't find anything that I can properly understand and execute after several weeks of trying.
Please help.
nb: I did this eject thing once to fix electron which can't be undone.
directories and how things are structured
My package.json file:
{
"name": "<the name>",
"author": "<my name>",
"version": "0.1.0",
"description": "<the description>",
"private": true,
"dependencies": {
"#babel/core": "7.9.0",
"#electron/typescript-definitions": "^8.7.4",
"#kennethormandy/react-fittext": "^0.6.0",
"#material-ui/icons": "^4.9.1",
"#react-native-community/async-storage": "^1.10.0",
"#svgr/webpack": "4.3.3",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"#typegoose/typegoose": "^7.0.0",
"#types/jest": "^24.9.1",
"#types/mongoose": "^5.7.14",
"#types/node": "^12.12.37",
"#types/react": "^16.9.34",
"#types/react-beautiful-dnd": "^12.1.2",
"#types/react-dom": "^16.9.7",
"#types/socket.io-client": "^1.4.32",
"#types/tweenjs": "^1.0.0",
"#typescript-eslint/eslint-plugin": "^2.10.0",
"#typescript-eslint/parser": "^2.10.0",
"alm": "^2.39.1",
"babel-eslint": "10.1.0",
"babel-jest": "^24.9.0",
"babel-loader": "8.1.0",
"babel-plugin-named-asset-import": "^0.3.6",
"babel-preset-react-app": "^9.1.2",
"camelcase": "^5.3.1",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"css-loader": "3.4.2",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"electron-browser-storage": "^1.0.6",
"electron-simple-window-manager": "^1.1.1",
"electron-store": "^5.1.1",
"eslint": "^6.6.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "3.0.3",
"eslint-plugin-flowtype": "4.6.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "4.3.0",
"fs-extra": "^8.1.0",
"howler": "^2.2.0",
"html-webpack-plugin": "4.0.0-beta.11",
"identity-obj-proxy": "3.0.0",
"jest": "24.9.0",
"jest-environment-jsdom-fourteen": "1.0.1",
"jest-resolve": "24.9.0",
"jest-watch-typeahead": "0.4.2",
"mini-css-extract-plugin": "0.9.0",
"mongoose": "^5.9.11",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.6.4",
"popmotion": "^8.7.3",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-aspect-ratio": "^1.0.42",
"react-beautiful-dnd": "^13.0.0",
"react-dev-utils": "^10.2.1",
"react-dnd": "^10.0.2",
"react-dnd-html5-backend": "^10.0.2",
"react-dom": "^16.13.1",
"react-draggable": "^4.3.1",
"react-fittext": "^1.0.0",
"react-icons": "^3.10.0",
"react-image-tint": "^1.0.2",
"react-native-easy-dnd": "^1.0.2",
"react-responsive-spritesheet": "^2.3.9",
"react-textfit": "^1.1.0",
"react-z-index": "^3.0.0",
"resolve": "1.15.0",
"resolve-url-loader": "3.1.1",
"sass-loader": "8.0.2",
"semver": "6.3.0",
"socket.io-client": "^2.3.0",
"style-loader": "0.23.1",
"terser-webpack-plugin": "2.3.5",
"ts-pnp": "1.1.6",
"tweenjs": "^1.0.2",
"typescript-react-draggable": "^1.0.0",
"url-loader": "2.3.0",
"webpack": "4.42.0",
"webpack-dev-server": "3.10.3",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1",
"xml-js": "^1.6.11"
},
"scripts": {
"pack": "electron-builder build --dir",
"dist": "npm run build && electron-builder build",
"postinstall": "install-app-deps",
"start": "nf start -p 3000",
"build": "node scripts/build.js",
"test": "node scripts/test.js",
"eject": "node scripts/eject.js",
"electron": "electron .",
"electron-start": "node src/electron-wait-react.js",
"react-start": "set BROWSER=nul && node scripts/start.js"
},
"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": {
"#types/express": "^4.17.6",
"#types/howler": "^2.1.2",
"#types/socket.io": "^2.1.4",
"electron-builder": "^22.6.0",
"express": "^4.17.1",
"foreman": "^3.0.1",
"node-sass": "^4.14.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-native-web": "0.11.2",
"socketio": "^1.0.0",
"typescript": "^3.8.3"
},
"homepage": "./",
"jest": {
"roots": [
"<rootDir>/src"
],
"collectCoverageFrom": [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts"
],
"setupFiles": [
"react-app-polyfill/jsdom"
],
"setupFilesAfterEnv": [],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
],
"testEnvironment": "jest-environment-jsdom-fourteen",
"transform": {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$"
],
"modulePaths": [
"C:\\Users\\mr003\\Documents\\programmation\\ZwangReact\\zwang\\src"
],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
},
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
"node"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
},
"babel": {
"presets": [
"react-app"
]
}
}

material UI Multiple Select not viewing several selected items when they selected, my be css issue

I tried to use the Multiple Select. But I get a difference, is that when many items are selected, they are not viewed, I couldn't change the height to be enough to display selected options. please help.
I am sure it is height property because I added height:auto using chrome console and so selected options could be viewed and issue solved at the console. You can guide me through adding the height feature properly. The height may be added to chips style at the styles.
By the way, the problem doesn't appear on a fresh copy of create-react-app that I tested it on it today, but my project which faces the problem is based on a create-project-app generated long time ago, I thought updates or create-react-app releases make difference.
Material UI version: v1.0.0-beta.33
package.json
{
"name": "client",
"version": "0.1.0",
"private": true,
"proxy": {
"auth/google": {
"target": "https://server243.azurewebsites.net"
},
"/api/*": {
"target": "https://server243.azurewebsites.net"
},
"/apis/*": {
"target": "https://server243.azurewebsites.net"
}
},
"dependencies": {
"autoprefixer": "7.1.6",
"aws-amplify": "^0.2.0",
"aws-amplify-react-native": "^0.2.2",
"axios": "^0.17.1",
"babel-core": "6.26.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.2",
"babel-preset-react-app": "^3.1.0",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"css-loader": "0.28.7",
"dotenv": "4.0.0",
"eslint": "4.10.0",
"eslint-config-react-app": "^2.0.1",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.39.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.4.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.5",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"jquery": "^3.2.1",
"material-ui": "^1.0.0-beta.24",
"material-ui-icons": "^1.0.0-beta.17",
"materialize-css": "^0.100.2",
"moment": "^2.20.1",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.8",
"promise": "8.0.1",
"prop-types": "^15.6.0",
"raf": "3.4.0",
"react": "^16.0.0",
"react-bootstrap": "^0.31.5",
"react-dev-utils": "^4.2.1",
"react-dom": "^16.0.0",
"react-hot-loader": "^3.1.3",
"react-loader": "^2.4.2",
"react-loading-skeleton": "^0.3.1",
"react-moment": "^0.6.8",
"react-redux": "^5.0.6",
"react-router-dom": "^4.2.2",
"react-select": "^1.0.0-rc.10",
"react-select-me": "^0.9.0",
"react-virtualized-select": "^3.1.0",
"redux": "^3.7.2",
"redux-auth": "0.0.5-beta5",
"redux-auth-wrapper": "^2.0.2",
"redux-thunk": "^2.2.0",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"universal-cookie": "^2.1.2",
"url-loader": "0.6.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.3",
"webpack-manifest-plugin": "1.3.2",
"whatwg-fetch": "2.0.3"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom",
"cypress:open": "cypress open"
},
"devDependencies": {
"cypress": "^1.4.1"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx,mjs}"
],
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testMatch": [
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
],
"moduleNameMapper": {
"^react-native$": "react-native-web"
},
"moduleFileExtensions": [
"web.js",
"mjs",
"js",
"json",
"web.jsx",
"jsx",
"node"
]
},
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
}
}
Temporary solution: I updated the height and padding at node_modules\material-ui\Select\Select.js but I wish I get right way to solve it.
selectMenu: {
width: 'auto', // Fix Safari textOverflow
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
overflow: 'hidden',
lineHeight: 'calc(1em + ' + (theme.spacing.unit * 2 - 2) + 'px)',
// I, abdulrhman, added the following:
height:'auto',
paddingTop: 20,
},
I believe the SelectField will have the expected behavior in newer versions of the beta. You should try updating to the latest version (material-ui^1.0.0-beta.33 at the time of this writing).
You can update to this version with the npm command:
npm install --save material-ui#1.0.0-beta.33

Issue with react-dom when deploying on heroku Error: Cannot resolve 'file' or 'directory' ./lib/ReactDOM

I have a create-react-app on heroku. When I try to deploy a change to production it is failing and giving me the following error:
Module not found: Error: Cannot resolve 'file' or 'directory' ./lib/ReactDOM in /tmp/build_a87ef5601c25702212bff26dba1f999c/node_modules/react-dom
However, it is successful when I do npm run build. Here is my package.json file:
{
"name": "test_app",
"version": "0.1.0",
"private": true,
"devDependencies": {
"autoprefixer": "6.5.1",
"babel-core": "6.17.0",
"babel-eslint": "7.0.0",
"babel-jest": "16.0.0",
"babel-loader": "6.2.5",
"babel-preset-react-app": "^1.0.0",
"case-sensitive-paths-webpack-plugin": "1.1.4",
"chalk": "1.1.3",
"connect-history-api-fallback": "1.3.0",
"cross-spawn": "4.0.2",
"css-loader": "0.25.0",
"detect-port": "1.0.1",
"dotenv": "2.0.0",
"eslint": "3.8.1",
"eslint-config-react-app": "^0.3.0",
"eslint-loader": "1.6.0",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.9.0",
"filesize": "3.3.0",
"find-cache-dir": "0.1.1",
"fs-extra": "0.30.0",
"gzip-size": "3.0.0",
"html-webpack-plugin": "2.24.0",
"http-proxy-middleware": "0.17.2",
"jest": "16.0.2",
"json-loader": "0.5.4",
"object-assign": "4.1.0",
"path-exists": "2.1.0",
"postcss-loader": "1.0.0",
"promise": "7.1.1",
"react": "^15.4.1",
"react-addons-test-utils": "^15.4.1",
"react-dev-utils": "^0.3.0",
"react-dom": "^15.4.1",
"recursive-readdir": "2.1.0",
"rimraf": "2.5.4",
"strip-ansi": "3.0.1",
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"webpack": "1.13.2",
"webpack-dev-server": "1.16.2",
"webpack-manifest-plugin": "1.1.0",
"whatwg-fetch": "1.0.0"
},
"dependencies": {
"axios": "^0.15.2",
"react": "^15.4.1",
"react-bootstrap": "^0.30.6",
"react-dom": "^15.4.1",
"react-redux": "4.4.5",
"react-router": "^3.0.0",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
"socket.io": "^1.5.1"
},
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom"
},
"jest": {
"moduleFileExtensions": [
"jsx",
"js",
"json"
],
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/jest/FileStub.js",
"^.+\\.css$": "<rootDir>/config/jest/CSSStub.js"
},
"setupFiles": [
"<rootDir>/config/polyfills.js"
],
"testPathIgnorePatterns": [
"<rootDir>/(build|docs|node_modules)/"
],
"testEnvironment": "node"
},
"babel": {
"presets": [
"react-app"
]
},
"eslintConfig": {
"extends": "react-app"
}
}
I tried removing the node_modules file and re-installing per the advice here but I continue to get the same error. I have buildpack set up with heroku and was able to successfully deploy the app last week. Any help or advice would be greatly appreciated.

Resources