Cannot read property 'tap' of undefined
See original GitHub issueCurrent Behavior
Running nx run app:serve
provide following error (Failure Logs)
Expected Behavior
Open the app without errors or warnings Is this a regression? No
Steps to Reproduce
Here’s a Github repo And the following actions run
Steps,
- Create an nx workspace with react preset
- Add following package.json file
{ "dependencies": { "core-js": "^3.13.1", "document-register-element": "1.14.10", "gatsby": "^3.6.2", "gatsby-image": "3.6.0", "gatsby-plugin-manifest": "3.6.0", "gatsby-plugin-offline": "4.6.0", "gatsby-plugin-react-helmet": "4.6.0", "gatsby-plugin-sharp": "3.6.0", "gatsby-plugin-svgr": "3.0.0-beta.0", "gatsby-plugin-typescript": "3.6.0", "gatsby-source-filesystem": "3.6.0", "gatsby-transformer-sharp": "3.6.0", "next": "10.2.3", "prop-types": "15.7.2", "react": "17.0.2", "react-dom": "17.0.2", "react-helmet": "6.1.0", "regenerator-runtime": "0.13.7", "tslib": "^2.2.0" }, "devDependencies": { "@babel/core": "7.14.3", "@babel/preset-env": "7.14.4", "@babel/preset-react": "7.13.13", "@babel/preset-typescript": "7.13.0", "@emotion/babel-preset-css-prop": "11.2.0", "@nrwl/cli": "12.3.6", "@nrwl/cypress": "12.3.6", "@nrwl/eslint-plugin-nx": "12.3.6", "@nrwl/express": "^12.3.6", "@nrwl/gatsby": "^12.3.6", "@nrwl/jest": "12.3.6", "@nrwl/linter": "12.3.6", "@nrwl/next": "^12.3.6", "@nrwl/node": "12.3.6", "@nrwl/nx-cloud": "12.1.8", "@nrwl/react": "^12.3.6", "@nrwl/storybook": "^12.3.6", "@nrwl/tao": "12.3.6", "@nrwl/web": "^12.3.6", "@nrwl/workspace": "12.3.6", "@storybook/addon-knobs": "^6.2.9", "@storybook/react": "^6.2.9", "@svgr/webpack": "^5.5.0", "@testing-library/react": "11.2.7", "@types/jest": "26.0.23", "@types/node": "15.12.0", "@types/reach__router": "^1.3.8", "@types/react": "17.0.9", "@types/react-dom": "17.0.6", "@types/react-redux": "7.1.16", "@types/webpack": "5.28.0", "@typescript-eslint/eslint-plugin": "4.26.0", "@typescript-eslint/parser": "4.26.0", "babel-jest": "27.0.2", "babel-loader": "8.2.2", "babel-plugin-module-resolver": "4.1.0", "babel-preset-gatsby": "1.6.0", "cypress": "^7.4.0", "dotenv": "10.0.0", "eslint": "7.27.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-cypress": "^2.11.3", "eslint-plugin-import": "2.23.4", "eslint-plugin-jsx-a11y": "6.4.1", "eslint-plugin-react": "7.24.0", "eslint-plugin-react-hooks": "4.2.0", "jest": "27.0.4", "prettier": "2.3.0", "ts-jest": "27.0.2", "ts-node": "~10.0.0", "tslint": "~6.1.3", "typescript": "~4.3.2", "url-loader": "^4.1.1" } }
- Install dependencies with yarn
- Run the app with serve
Failure Logs
`> nx run test:serve Starting type checking service… Using 1 worker with 2048MB memory limit Cannot read property ‘tap’ of undefined
———————————————————————————————————————————————
NX ERROR Running target “test:serve” failed
Failed tasks:
- test:serve
Error: Process completed with exit code 1.`
Environment
Node : 14.17.0 OS : linux x64 yarn : 1.22.10
nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 12.3.6 @nrwl/cypress : 12.3.6 @nrwl/devkit : 12.3.6 @nrwl/eslint-plugin-nx : 12.3.6 @nrwl/express : 12.3.6 @nrwl/jest : 12.3.6 @nrwl/linter : 12.3.6 @nrwl/nest : Not Found @nrwl/next : 12.3.6 @nrwl/node : 12.3.6 @nrwl/react : 12.3.6 @nrwl/schematics : Not Found @nrwl/tao : 12.3.6 @nrwl/web : 12.3.6 @nrwl/workspace : 12.3.6 @nrwl/storybook : 12.3.6 @nrwl/gatsby : 12.3.6 typescript : 4.3.2
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:19 (3 by maintainers)
@Himadu2000 i submit a pr to your repo. so basically to have react and gatsby in the same nx workspace, you need to have webpack 5. this is what I did:
nx migrate latest
to install the latest nx packagesnpx nx g @nrwl/web:webpack5
to upgrade to webpack 5Closing this issue since we’ve moved Gatsby plugin to the labs repo. https://github.com/nrwl/nx-labs
Feel free to open it there.