Replies: 1 comment 2 replies
-
|
Apparently you are using webpack-dev-server v4 in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm trying to use Docusaurus to build a documentation website as part of a React-Vite project. I have the directory structure as follows:
Where
docs-siteis the docusaurus folder bootstrapped withnpx @docusaurus/init@latest init docs-site classic.My package.json looks like the following:
Whenever I run
yarn docs:devit starts up the dev server but throws an errorValidationError: Invalid options object. Dev Middleware has been initialized using an options object that does not match the API schema.. However, when Icdintodocs-siteand runnpm run startit works like a charm. This problem only exists when developing. Building works wonders. Am I doing something wrong? This is my first time using the "monorepo" structure and it boggles my mind.Root package.json:
{ "name": "qalam-next", "version": "0.1.0", "private": true, "workspaces": [ "docs-site" ], "scripts": { "docs:dev": "yarn workspace docs-site start", "docs:build": "yarn workspace docs-site build", "docs:serve": "yarn workspace docs-site serve", }, "dependencies": { "@axe-core/react": "^4.2.2", "@babel/plugin-transform-runtime": "^7.14.5", "@babel/preset-env": "^7.14.7", "@mdx-js/loader": "^1.6.22", "camelcase-keys": "^7.0.0", "classnames": "^2.3.1", "jest": "^27.0.6", "prettier": "^2.3.2", "react": "17.0.2", "react-dom": "17.0.2", "react-intl": "^5.20.4", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-testing-library": "^8.0.1", "sass": "^1.35.2", "snakecase-keys": "^4.0.2", "storybook-addon-react-docgen": "^1.2.42", "swr": "^0.5.6", "urql": "^2.0.4", "webpack-merge": "^5.8.0", "zustand": "^3.5.7" }, "devDependencies": { "@babel/cli": "^7.14.8", "@babel/core": "^7.14.6", "@babel/eslint-parser": "^7.14.7", "@babel/plugin-transform-modules-commonjs": "^7.14.5", "@babel/preset-react": "^7.14.5", "@babel/preset-typescript": "^7.14.5", "@formatjs/cli": "^4.2.31", "@storybook/addon-a11y": "^6.3.4", "@storybook/addon-actions": "^6.3.4", "@storybook/addon-essentials": "^6.3.4", "@storybook/addon-links": "^6.3.7", "@storybook/addon-storyshots": "^6.3.4", "@storybook/builder-webpack5": "6.3.4", "@storybook/manager-webpack5": "6.3.4", "@storybook/react": "^6.3.4", "@svgr/webpack": "^5.5.0", "@types/jest": "^26.0.24", "@types/node": "^16.4.1", "@types/react": "^17.0.15", "@types/react-dom": "^17.0.9", "@types/react-router": "^5.1.16", "@types/react-router-dom": "^5.1.8", "@typescript-eslint/parser": "^4.28.4", "autoprefixer": "^10.3.4", "babel-jest": "^27.0.6", "babel-loader": "^8.2.2", "babel-plugin-macros": "^3.1.0", "css-loader": "^6.2.0", "cssnano": "^5.0.8", "eslint": "^7.31.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^8.3.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.23.4", "eslint-plugin-jest": "^24.3.6", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-mdx": "^1.14.1", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.24.0", "eslint-plugin-react-hooks": "^4.2.0", "file-loader": "^6.2.0", "identity-obj-proxy": "^3.0.0", "msw": "^0.35.0", "msw-storybook-addon": "^1.2.0", "npm-run-all": "^4.1.5", "postcss-import": "^14.0.2", "postcss-preset-env": "^6.7.0", "pre-commit": "^1.2.2", "react-test-renderer": "^17.0.2", "require-context.macro": "^1.2.2", "resolve-url-loader": "^4.0.0", "sass-loader": "^12.1.0", "storybook-addon-performance": "^0.16.0", "storybook-react-router": "^1.0.8", "storybook-svgr-react-component": "^1.0.1", "style-loader": "^3.2.1", "stylelint": "^13.13.1", "stylelint-config-idiomatic-order": "^8.1.0", "stylelint-config-recess-order": "^2.4.0", "stylelint-config-standard": "^22.0.0", "stylelint-order": "^4.1.0", "stylelint-scss": "^3.20.1", "typescript": "^4.3.5", "vite": "^2.5.1", "vite-plugin-svgr": "^0.4.0", "webpack": "^5.46.0" }, "msw": { "workerDirectory": "public" }, "resolutions": { "webpack": "^5.46.0", "css-loader": "^6.2.0", "dotenv-webpack": "^6.0.0", "html-webpack-plugin": "^5.3.2", "style-loader": "^2.0.0", "terser-webpack-plugin": "^5.1.4", "webpack-dev-middleware": "^4.1.0", "webpack-virtual-modules": "^0.4.2" } }docs-site package.json:
{ "name": "docs-site", "version": "0.0.0", "private": true, "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { "@docusaurus/core": "2.0.0-beta.5", "@docusaurus/preset-classic": "2.0.0-beta.5", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", "file-loader": "^6.2.0", "prism-react-renderer": "^1.2.1", "react": "^17.0.1", "react-dom": "^17.0.1", "url-loader": "^4.1.1" }, "resolutions": { "webpack-dev-server": "^3.11.2" }, }Beta Was this translation helpful? Give feedback.
All reactions