please help me to understand what is the problem
when I start npm start I have a error
_this.compiler.applyPluginsAsync is not a function
npm version is 6.4.1
node version is v 10.13.0
my package.json file
"devDependencies": {
"#types/enzyme": "^3.1.15",
"#types/enzyme-adapter-react-16": "^1.0.3",
"#types/jest": "^23.3.9",
"#types/node": "^10.12.9",
"#types/react": "^16.7.6",
"#types/react-dom": "^16.0.9",
"#types/react-intl": "^2.3.12",
"#types/react-redux": "^6.0.9",
"#types/react-router": "^4.4.1",
"#types/react-router-dom": "^4.3.1",
"#types/react-select": "^2.0.7",
"#types/react-table": "^6.7.16",
"#types/reactstrap": "^6.4.2",
"#types/redux": "^3.6.0",
"autoprefixer": "7.1.6",
"babel-jest": "^22.1.0",
"babel-loader": "^7.1.2",
"babel-preset-react-app": "^3.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"css-loader": "0.28.7",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.7.0",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "0.11.2",
"fork-ts-checker-webpack-plugin": "^0.2.10",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"json-server": "^0.14.0",
"node-sass": "^4.9.3",
"postcss-loader": "2.0.8",
"react-dev-utils": "^5.0.3",
"react-dropzone": "^5.1.1",
"redux-devtools-extension": "^2.13.5",
"resolve": "1.6.0",
"sass-loader": "^7.1.0",
"source-map-loader": "^0.2.4",
"style-loader": "0.19.0",
"sw-precache-webpack-plugin": "0.11.4",
"ts-jest": "22.0.1",
"ts-loader": "^2.3.7",
"tsconfig-paths-webpack-plugin": "^2.0.0",
"tslint": "^5.7.0",
"tslint-config-prettier": "^1.16.0",
"tslint-react": "^3.2.0",
"typescript": "^3.1.6",
"uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "0.6.2",
"webpack": "^4.26.0",
"webpack-dev-server": "^3.1.10",
"webpack-manifest-plugin": "1.3.2"
}
According to the official repo of fork-ts-checker-webpack-plugin, this was reported in this issue and fixed in version 0.6.1. Update that package and try again to see if it happens.
Related
I'm using lingui package in my React project with CRA and
I get an error when using lingui/macro modules t method.
When I build project got webpack warning message.
Like this.
Critical dependency: the request of a dependency is an expression
This seems to be due to bable-plugin-macro, but I don't know the exact cause. Help me!!
Here my error & codes
import { t } from '#lingui/macro';
render() {
return (
<ListItemText primary={i18n._(t`Apps`)} />
)
}
error:
ERROR in ./node_modules/import-fresh/node_modules/resolve-from/index.js
Module not found: Error: Can't resolve 'module' in 'D:\myProject\node_modules\import-fresh\node_modules\resolve-from'
# ./node_modules/import-fresh/node_modules/resolve-from/index.js 3:15-32
# ./node_modules/import-fresh/index.js
# ./node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/loaders.js
# ./node_modules/babel-plugin-macros/node_modules/cosmiconfig/dist/index.js
package.json:
"dependencies": {
"#babel/core": "^7.10.2",
"#condenast/xml-to-react": "^1.0.0",
"#date-io/moment": "1.3.13",
"#lingui/core": "^2.9.1",
"#lingui/react": "^2.9.1",
"#loadable/component": "^5.12.0",
"#material-ui/core": "^4.2.1",
"#material-ui/icons": "^4.2.1",
"#material-ui/lab": "^4.0.0-alpha.21",
"#material-ui/pickers": "^3.2.10",
"#svgr/webpack": "4.1.0",
"#types/crypto-js": "^3.1.43",
"#types/jxon": "^2.0.0",
"#types/lingui__macro": "^2.7.3",
"#types/lingui__react": "^2.8.2",
"#types/loadable__component": "^5.10.0",
"#types/lodash": "^4.14.149",
"#types/material-ui": "^0.21.7",
"#types/node": "^12.12.21",
"#types/react-beautiful-dnd": "^12.1.2",
"#types/react-loadable": "^5.5.3",
"#types/react-router-dom": "^5.1.3",
"#types/recharts": "^1.8.10",
"#typescript-eslint/eslint-plugin": "1.6.0",
"#typescript-eslint/parser": "1.6.0",
"axios": "^0.19.0",
"babel-eslint": "10.0.1",
"babel-jest": "^24.8.0",
"babel-loader": "^8.1.0",
"babel-plugin-named-asset-import": "^0.3.2",
"babel-preset-react-app": "^9.0.0",
"camelcase": "^5.2.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"crypto-js": "^4.0.0",
"css-loader": "2.1.1",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"eslint": "^5.16.0",
"eslint-config-react-app": "^4.0.1",
"eslint-loader": "2.1.2",
"eslint-plugin-flowtype": "2.50.1",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-react-hooks": "^1.5.0",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
"identity-obj-proxy": "3.0.0",
"is-wsl": "^1.1.0",
"jest": "24.7.1",
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.7.1",
"jest-watch-typeahead": "0.3.0",
"jxon": "^2.0.0-beta.5",
"lodash": "^4.17.15",
"material-table": "^1.54.2",
"md5": "^2.2.1",
"mini-css-extract-plugin": "0.5.0",
"mobx": "4.3.1",
"mobx-react": "^6.1.1",
"moment": "^2.24.0",
"optimize-css-assets-webpack-plugin": "5.0.1",
"pnp-webpack-plugin": "1.2.1",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "7.0.1",
"postcss-preset-env": "6.6.0",
"postcss-safe-parser": "4.0.1",
"react": "^16.8.6",
"react-app-polyfill": "^1.0.1",
"react-beautiful-dnd": "^13.0.0",
"react-contenteditable": "^3.3.2",
"react-dev-utils": "^9.0.1",
"react-dom": "^16.8.6",
"react-json-editor-ajrm": "^2.5.9",
"react-loadable": "^5.5.0",
"react-perf-devtool": "^3.1.8",
"react-router-dom": "^5.0.1",
"recharts": "^1.8.5",
"resolve": "1.10.0",
"semver": "6.0.0",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.2.3",
"ts-pnp": "1.1.2",
"tslint": "^5.20.1",
"url-loader": "1.1.2",
"uuid": "^7.0.2",
"validator": "^11.1.0",
"webpack": "4.29.6",
"webpack-dev-server": "3.2.1",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "4.2.0"
},
"babel": {
"presets": [
"react-app",
"babel-preset-env",
"babel-preset-react",
"#lingui/babel-preset-react"
],
"plugins": [
"macros",
"babel-plugin-macros",
[
"#babel/plugin-proposal-decorators",
{
"legacy": true
}
]
],
"ignore": [
"node_modules",
"public/dist"
]
},
"devDependencies": {
"#babel/plugin-proposal-decorators": "^7.7.4",
"#babel/preset-env": "^7.10.2",
"#lingui/cli": "^2.9.1",
"#lingui/macro": "^2.9.1",
"autoprefixer": "^9.6.1",
"awesome-typescript-loader": "^5.2.1",
"babel-core": "^7.0.0-bridge.0",
"babel-plugin-macros": "^2.8.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"cross-env": "^5.2.0",
"cssnano": "^4.1.10",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"fork-ts-checker-webpack-plugin": "^3.1.1",
"hard-source-webpack-plugin": "^0.13.1",
"node-cmd": "^3.0.0",
"node-sass": "^4.9.3",
"prettier": "^1.18.2",
"prettier-eslint": "^9.0.0",
"sass-loader": "^7.1.0",
"source-map-loader": "^0.2.4",
"ts-loader": "^6.2.1",
"typescript": "^3.7.3",
"typescript-eslint-parser": "^18.0.0",
"webpack-cli": "^3.3.6"
},
Doing Lynda - Building and Deploying a Full-Stack React Application tutorial, and get stuck at a point, get following error:
./src/index.js
Error: [BABEL] /Users/kukodajanos/Workspace/ticket/src/index.js: The (relay-query) Babel 5 plugin is being run with an unsupported Babel version. (While processing: "/Users/kukodajanos/Workspace/ticket/node_modules/babel-plugin-react-relay/lib/index.js")
at Array.reduce (<anonymous>)
I tried suggestion written here: https://github.com/facebookarchive/relay-starter-kit/issues/74
npm i babel-relay-plugin#latest --save
It did not help, give same error.
Dependencies from package.json here:
"dependencies": {
"#babel/core": "7.5.5",
"#svgr/webpack": "4.3.2",
"#typescript-eslint/eslint-plugin": "1.13.0",
"#typescript-eslint/parser": "1.13.0",
"babel-eslint": "10.0.2",
"babel-jest": "^24.8.0",
"babel-loader": "8.0.6",
"babel-plugin-named-asset-import": "^0.3.3",
"babel-preset-react-app": "^9.0.1",
"babel-relay-plugin": "^0.11.0",
"camelcase": "^5.2.0",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"css-loader": "2.1.1",
"dotenv": "6.2.0",
"dotenv-expand": "4.2.0",
"eslint": "^6.1.0",
"eslint-config-react-app": "^5.0.1",
"eslint-loader": "2.2.1",
"eslint-plugin-flowtype": "3.13.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
"identity-obj-proxy": "3.0.0",
"is-wsl": "^1.1.0",
"jest": "24.8.0",
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.8.0",
"jest-watch-typeahead": "0.3.1",
"mini-css-extract-plugin": "0.5.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.5.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "7.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"prop-types": "^15.7.2",
"react": "^16.9.0",
"react-app-polyfill": "^1.0.2",
"react-dev-utils": "^9.0.3",
"react-dom": "^16.9.0",
"react-router": "3.0.2",
"resolve": "1.12.0",
"resolve-url-loader": "3.1.0",
"sass-loader": "7.2.0",
"semver": "6.3.0",
"style-loader": "1.0.0",
"terser-webpack-plugin": "1.4.1",
"ts-pnp": "1.1.2",
"url-loader": "2.1.0",
"webpack": "4.39.1",
"webpack-dev-server": "3.2.1",
"webpack-manifest-plugin": "2.0.4",
"workbox-webpack-plugin": "4.3.1"
}
"devDependencies": {
"babel-plugin-react-relay": "^0.10.0"
}
I installed react native into my app. And now I can't start my app.
I show you code from a package.json, my code from component and error code. I tried to install react-native from npm but now I past something from react-native-app.
package.json:
"dependencies": {
"apollo-cache-inmemory": "^1.1.10",
"apollo-client": "^2.2.6",
"apollo-link-http": "^1.5.3",
"babel-polyfill": "^7.0.0-beta.2",
"bluebird": "^3.5.1",
"body-parser": "^1.18.2",
"bunyan": "^1.8.12",
"cookie-parser": "^1.4.3",
"core-js": "^2.5.1",
"express": "^4.16.1",
"express-jwt": "^5.3.0",
"graphql": "^0.11.7",
"graphql-tag": "^2.5.0",
"history": "^4.7.2",
"htmlparser2": "^3.9.2",
"isomorphic-style-loader": "^4.0.0",
"json2csv-stream": "^0.1.4",
"jsonwebtoken": "^8.0.1",
"libphonenumber-js": "^0.4.38",
"moment": "^2.20.1",
"morgan": "^1.9.0",
"node-fetch": "^1.7.3",
"normalize.css": "^7.0.0",
"pretty-error": "^2.1.1",
"prop-types": "^15.6.0",
"query-string": "^5.0.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-apollo": "^2.0.4",
"react-awesome-modal": "^2.0.5",
"react-collapsible": "^2.0.3",
"react-dom": "^16.0.0",
"react-google-maps": "^9.4.5",
"react-loadable": "^5.5.0",
"react-scroll": "^1.5.5",
"react-scrollbar": "^0.5.4",
"react-textarea-autosize": "^5.2.1",
"serialize-javascript": "^1.3.0",
"source-map-support": "^0.5.0",
"universal-router": "^4.2.0",
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {
"assets-webpack-plugin": "^3.5.1",
"autoprefixer": "^7.1.4",
...(babel)
"browser-sync": "^2.18.13",
"metro-react-native-babel-preset": "0.51.1",
"chokidar": "^1.7.0",
"css-loader": "^0.28.7",
"enzyme": "^3.1.0",
"eslint": "^4.8.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-prettier": "^2.6.0",
"eslint-import-resolver-node": "^0.3.1",
"eslint-loader": "^1.9.0",
"eslint-plugin-css-modules": "^2.7.5",
"eslint-plugin-flowtype": "^2.38.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.4.0",
"file-loader": "^1.1.5",
"flow-bin": "^0.56.0",
"front-matter": "^2.2.0",
"glob": "^7.1.2",
"husky": "^0.14.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^21.2.1",
"jscodeshift": "^0.3.32",
"lint-staged": "^4.2.3",
"markdown-it": "^8.4.0",
"mkdirp": "^0.5.1",
"null-loader": "^0.1.1",
"pixrem": "^4.0.1",
"pleeease-filters": "^4.0.0",
...(postcss)
"prettier": "^1.7.4",
"raw-loader": "^0.5.1",
"react-deep-force-update": "^2.1.1",
"react-dev-utils": "^4.1.0",
"react-error-overlay": "^2.0.2",
"react-test-renderer": "^16.0.0",
"rimraf": "^2.6.2",
"stylelint": "^8.1.1",
"stylelint-config-standard": "^17.0.0",
"stylelint-order": "^0.7.0",
"svg-url-loader": "^2.2.0",
"url-loader": "^0.6.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-node-externals": "^1.6.0"
},
code from component:
import { Dimensions } from 'react-native';
const deviceWidth = Number(Dimensions.get('window').width - 'px');
render() { ...
const slidesStyles =
deviceWidth >= 800
? {
width: `${100 * children.length / 3}%`,
transform: `translateX(${-1 *
index *
(100 / children.length / 3)}%)`,
}
: {
width: `${100 * children.length}%`,
transform: `translateX(${-1 * index * (100 / children.length)}%)`,
}; ...}
and error code (it's too big, but all errors link with it):
ERROR in ./node_modules/react-native/Libraries/react-native/react-native-implementation.js
Can you help me to start my app?
The issue looks like with node_modules folder. Try to delete your node_modules folder using command rm -rf node_modules and then run npm install and then run your app using react-native run-android or react-native run-ios
I created my app with dotnet new reactredux (2.0) some time ago, it uses webpack 2.5.3, I'm really keeen to update to more up to date version, however there are plenty of dependecies that don't support newer versions. Is there anybody who successfully did that?
dependecies that bother me a most:
aspnet-webpack
aspnet-webpack-react
seems discountinued
there my full project dependencies:
"devDependencies": {
"#types/history": "4.6.0",
"#types/jest": "^22.1.3",
"#types/react": "^16.3.13",
"#types/react-dom": "^16.0.4",
"#types/react-hot-loader": "3.0.3",
"#types/react-redux": "4.4.45",
"#types/react-router": "^4.0.23",
"#types/react-router-dom": "^4.2.5",
"#types/react-router-redux": "5.0.3",
"#types/webpack": "2.2.15",
"#types/webpack-env": "1.13.0",
"#types/fetch-mock": "^6.0.0",
"#types/enzyme": "^3.1.10",
"#types/enzyme-adapter-react-16": "^1.0.2",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"aspnet-prerendering": "^3.0.1",
"aspnet-webpack": "^2.0.1",
"aspnet-webpack-react": "^3.0.0",
"awesome-typescript-loader": "3.2.1",
"css-loader": "0.28.4",
"domain-task": "^3.0.3",
"event-source-polyfill": "0.0.9",
"extract-text-webpack-plugin": "2.1.2",
"file-loader": "0.11.2",
"foundation-sites": "^6.4.4-rc1",
"history": "4.6.3",
"jest": "22.4.2",
"jest-cli": "22.4.2",
"fetch-mock": "^6.0.1",
"jquery": "3.2.1",
"node-noop": "1.0.0",
"node-sass": "^4.7.2",
"react": "^16.3.2",
"react-dom": "^16.2.0",
"react-hot-loader": "3.0.0-beta.7",
"react-redux": "5.0.5",
"react-router-dom": "4.2.2",
"react-router-redux": "5.0.0-alpha.6",
"redux": "3.7.1",
"redux-thunk": "2.2.0",
"sass-loader": "^6.0.6",
"style-loader": "0.18.2",
"ts-jest": "22.0.4",
"ts-nameof": "^0.10.3",
"typescript": "2.4.1",
"url-loader": "0.5.9",
"webpack": "2.5.1",
"webpack-hot-middleware": "2.18.2",
"webpack-merge": "4.1.0",
"circular-dependency-plugin": "^4.4.0"
When I run the command
npm install react-d3-tooltip --save
it shows the following warning on the terminal like as in the attached image. Unmet peer dependency react#0.14.7.
My package.json file includes the following dependencies
"devDependencies": {
"babel-core": "6.17.0",
"babel-eslint": "7.0.0",
"babel-loader": "6.2.5",
"babel-preset-es2015": "6.16.0",
"babel-preset-react": "6.16.0",
"babel-preset-stage-1": "6.16.0",
"cheerio": "0.22.0",
"colors": "1.1.2",
"copy-webpack-plugin": "3.0.1",
"css-loader": "0.25.0",
"eslint": "2.8.0",
"eslint-plugin-react": "6.3.0",
"extract-text-webpack-plugin": "1.0.1",
"file-loader": "0.9.0",
"jquery": "2.2.2",
"jsdom": "9.6.0",
"json-loader": "0.5.4",
"node-sass": "3.10.1",
"postcss-loader": "0.13.0",
"react-hot-loader": "3.0.0-beta.5",
"redux-devtools": "3.3.1",
"redux-devtools-dock-monitor": "1.1.1",
"redux-devtools-log-monitor": "1.0.11",
"redux-immutable-state-invariant": "1.2.4",
"redux-slider-monitor": "1.0.7",
"rimraf": "2.5.4",
"sass-loader": "4.0.2",
"style-loader": "0.13.1",
"url-loader": "0.5.7",
"webpack": "1.13.2",
"webpack-dashboard": "0.2.0",
"webpack-dev-server": "1.16.2"
},
"dependencies": {
"autoprefixer": "6.5.0",
"classnames": "2.2.5",
"d3": "4.2.8",
"http-server": "0.9.0",
"lodash": "4.16.3",
"react": "15.3.2",
"react-bootstrap": "0.30.5",
"react-d3-tooltip": "1.4.14",
"react-dom": "15.3.2",
"react-intl": "2.1.5",
"react-redux": "4.4.5",
"react-router": "2.8.1",
"react-router-bootstrap": "0.23.1",
"redux": "3.6.0",
"redux-form": "6.1.0",
"redux-intl": "1.0.1",
"semantic-ui-react": "0.56.1"
}
How I can solve this unmet peer dependency