Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'redux' or its correspondsing declarations #1321

Closed
markdthompson-SR opened this issue Aug 24, 2020 · 6 comments · Fixed by #1323
Closed

Cannot find module 'redux' or its correspondsing declarations #1321

markdthompson-SR opened this issue Aug 24, 2020 · 6 comments · Fixed by #1323
Labels

Comments

@markdthompson-SR
Copy link

markdthompson-SR commented Aug 24, 2020

We're upgrading to 11.3.0 to 12.0.1 and are getting the following error in our production build:
Screen Shot 2020-08-24 at 2 20 02 PM

Can you advise as to this issue?

Here's our package.json:

{
"name": "farmserver",
"private": true,
"sideEffects": false,
"scripts": {
"start": "foreman start -f Procfile.dev-server",
"test": "NODE_ENV=test jest --watch --coverage",
"test-ci": "NODE_ENV=test jest --maxWorkers=2",
"test:generate-output": "jest --json --outputFile=jest-test-results.json",
"test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"storybook": "start-storybook -p 6006 -s app/assets/fonts",
"build-storybook": "build-storybook",
"generate-graphql-schema": "rake graphql:dump_schema && gql2ts ./app/graphql/schema.json --ignore-type-name-declaration -o ./app/javascript/bundles/graphql/schema.d.ts -e ../../../app/javascript/bundles/graphql/conversionConfig.js && rake graphql:generate_fragment_matcher && yarn eslint --fix ./app/javascript/bundles/graphql/schema.d.ts",
"profile-webpack": "RAILS_ENV=production NODE_ENV=production bin/webpack --profile --json > stats.json && node_modules/.bin/webpack-bundle-analyzer stats.json",
"typescript": "tsc --noEmit",
"lint": "eslint './app/**/*.{js,ts,tsx}'"
},
"dependencies": {
"@apollo/react-testing": "^3.1.4",
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.9.0",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/runtime": "^7.9.0",
"@rails/webpacker": "^4.2.0",
"@sentry/browser": "^5.20.0",
"@types/enzyme": "^3.10.5",
"@types/jest": "^26.0.5",
"@types/node-sass": "^4.11.0",
"@types/react": "^16.9.31",
"@types/react-dom": "^16.9.6",
"@types/sinon": "^9.0.0",
"@types/webpack-env": "^1.15.2",
"actioncable": "^5.2.4-1",
"apollo-cache": "^1.3.2",
"apollo-cache-inmemory": "^1.6.3",
"apollo-client": "^2.6.4",
"apollo-link": "^1.2.13",
"apollo-link-error": "^1.1.12",
"apollo-link-http": "^1.5.16",
"apollo-link-rest": "^0.7.3",
"apollo-link-state": "^0.4.2",
"apollo-upload-client": "14.1.0",
"apollo-utilities": "^1.3.2",
"babel-core": "^6.26.3",
"caniuse-lite": "^1.0.30001105",
"classnames": "^2.2.6",
"css-loader": "^3.2.1",
"enzyme-to-json": "^3.4.3",
"events": "^3.2.0",
"file-loader": "^6.0.0",
"graphql": "^14.5.8",
"graphql-anywhere": "^4.2.6",
"graphql-ruby-client": "^1.7.6",
"graphql-tag": "^2.10.3",
"history": "^4.10.1",
"imagemin": "^6.1.0",
"img-loader": "^3.0.1",
"js-yaml": "^3.13.1",
"lodash-webpack-plugin": "^0.11.5",
"lodash.isequal": "^4.5.0",
"lodash.omit": "^4.5.0",
"moment": "^2.24.0",
"postcss-cssnext": "^3.1.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"qs": "^6.9.1",
"query-string": "^6.11.1",
"react": "~16.13.0",
"react-apollo": "^3.1.4",
"react-dates": "^21.5.0",
"react-dom": "~16.13.0",
"react-html5-camera-photo": "^1.5.4",
"react-modal": "^3.11.2",
"react-on-rails": "^12.0.1",
"react-portal": "^4.2.0",
"react-router-dom": "^5.1.2",
"react-select": "^3.0.8",
"react-tabs": "^3.0.0",
"react-tooltip": "^4.1.2",
"react-with-direction": "^1.3.1",
"regenerator-runtime": "^0.13.6",
"reselect": "^4.0.0",
"sass-loader": "^9.0.2",
"subscriptions-transport-ws": "^0.9.17",
"ts-loader": "^8.0.1",
"typescript": "^3.9.7",
"url-loader": "^4.0.0",
"victory": "^35.0.5",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11",
"webpack-merge": "^5.0.9"
},
"devDependencies": {
"@babel/preset-typescript": "^7.9.0",
"@gql2ts/language-typescript": "^1.9.0",
"@sambego/storybook-state": "^2.0.1",
"@storybook/addon-actions": "^5.3.17",
"@storybook/addon-jest": "^5.3.17",
"@storybook/addon-knobs": "^5.3.17",
"@storybook/addon-links": "^5.3.17",
"@storybook/addons": "^5.3.17",
"@storybook/core": "^5.3.17",
"@storybook/react": "^5.3.17",
"@typescript-eslint/eslint-plugin": "^3.7.0",
"@typescript-eslint/parser": "^3.7.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-dynamic-import-node": "^2.2.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "^7.5.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.8",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"gql2ts": "^1.10.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.1.0",
"jest-localstorage-mock": "2.4.3",
"jest-runner-eslint": "^0.10.0",
"prop-types": "^15.0.0-0",
"sinon": "^9.0.1",
"webpack-bundle-analyzer": "^3.6.1",
"webpack-dev-server": "^3.9.0"
},
"jest": {
"testURL": "http://localhost/"
}
}

@justin808 justin808 added the bug label Aug 25, 2020
@justin808
Copy link
Member

This looks like a legit issue. I'm investigating, @markdthompson-SR.

@justin808
Copy link
Member

A very quick workaround would be to add redux. However, I'm going to ensure that this is not needed in the longer term.

@justin808
Copy link
Member

@markdthompson-SR Please confirm that 12.0.2 fixes your reported issue.

@markdthompson-SR
Copy link
Author

markdthompson-SR commented Aug 27, 2020 via email

@markdthompson-SR
Copy link
Author

markdthompson-SR commented Aug 31, 2020 via email

@justin808
Copy link
Member

Hi @markdthompson-SR, I recommend a few things:

  1. Join our React Rails Slack with this invite.
  2. Create a small reproduction by forking https://github.com/shakacode/react_on_rails_tutorial_with_ssr_and_hmr_fast_refresh and adding the eslint-loader
  3. Report back in a new, opened issue

And feel free to contact me directly: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants