zh-hans.single-spa.js.org
zh-hans.single-spa.js.org copied to clipboard
Project can not be started successfully.
1、pull latest version code, yarn install, can not start。 6 | 'component---site-src-pages-index-jsece-a18': [() => import(/* webpackChunkName: 'component---site-src-pages-index-jsece-a18' / "@site/src\pages\index.js"), "@site/src\pages\index.js", require.resolveWeak("@site/src\pages\index.js")], 7 | 'component---site-src-pages-languages-index-js-675-22d': [() => import(/ webpackChunkName: 'component---site-src-pages-languages-index-js-675-22d' */ "@site/src\pages\languages\index.js"), "@site/src\pages\languages\index.js", require.resolveWeak("@site/src\pages\languages\index.js")],
8 | 'component---site-src-pages-users-index-jsc-91-f50': [() => import(/* webpackChunkName: 'component---site-src-pages-users-index-jsc-91-f50' / "@site/src\pages\users\index.js"), "@site/src\pages\users\index.js", require.resolveWeak("@site/src\pages\users\index.js")], | ^ 9 | 'component---site-src-pages-versions-index-js-134-340': [() => import(/ webpackChunkName: 'component---site-src-pages-versions-index-js-134-340' / "@site/src\pages\versions\index.js"), "@site/src\pages\versions\index.js", require.resolveWeak("@site/src\pages\versions\index.js")], 10 | 'component---theme-blog-list-pagea-6-a-7ba': [() => import(/ webpackChunkName: 'component---theme-blog-list-pagea-6-a-7ba' / "@theme/BlogListPage"), "@theme/BlogListPage", require.resolveWeak("@theme/BlogListPage")], 11 | 'component---theme-blog-post-pageccc-cab': [() => import(/ webpackChunkName: 'component---theme-blog-post-pageccc-cab' */ "@theme/BlogPostPage"), "@theme/BlogPostPage", require.resolveWeak("@theme/BlogPostPage")], @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js 6:159-201 17:305-313 @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./.docusaurus/client-modules.js Module not found: Can't resolve 'D:FJiang6projects_jfsingle-spazh-hans.single-spa.js.orgwebsitestaticcsscustom.css' in 'D:\FJiang6\projects_jf\single-spa\zh-hans.single-spa.js.org\website.docusaurus'
2、 yarn upgrade, can not start either。
yarn run v1.22.4
warning package.json: No license field
$ docusaurus start
Starting the development server...
Error: It is not possible to use docs without any version. Please check the configuration of these options: includeCurrentVersion=undefined disableVersioning=undefined
at readVersionNames (D:\FJiang6\projects_jf\single-spa\zh-hans.single-spa.js.org\website\node_modules@docusaurus\plugin-content-docs\lib\versions.js:83:15)
at Object.readVersionsMetadata (D:\FJiang6\projects_jf\single-spa\zh-hans.single-spa.js.org\website\node_modules@docusaurus\plugin-content-docs\lib\versions.js:200:36)
at pluginContentDocs (D:\FJiang6\projects_jf\single-spa\zh-hans.single-spa.js.org\website\node_modules@docusaurus\plugin-content-docs\lib\index.js:27:41)
at lodash_1.default.compact.pluginConfigs.map.pluginItem (D:\FJiang6\projects_jf\single-spa\zh-hans.single-spa.js.org\website\node_modules@docusaurus\core\lib\server\plugins\init.js:33:54)
at Array.map (
1,I tried upgrade docusaurus to 2.0.0-alpha.70. "dependencies": { "@docusaurus/core": "2.0.0-alpha.70", "@docusaurus/preset-classic": "2.0.0-alpha.70", "classnames": "^2.2.6", "markdown-to-jsx": "^6.11.4", "react": "^16.12.0", "react-dom": "^16.12.0" },
2, yarn start
yarn run v1.22.4 warning package.json: No license field $ docusaurus start Starting the development server...
A validation error occured. The validation system was added recently to Docusaurus as an attempt to avoid user configuration errors. We may have made some mistakes. If you think your configuration is valid and should keep working, please open a bug report.
ValidationError: themeConfig.navbar.links has been renamed as themeConfig.navbar.items error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
3, change themeConfig.navbar.links to themeConfig.navbar.items in docusaurus.config.js.
4, yarn start $ docusaurus start Starting the development server... Bad docusaurus-plugin-redirects version 0.0.1. All official @docusaurus/* packages should have the exact same version as @docusaurus/core (2.0.0-alpha.70). Maybe you want to check, or regenerate your yarn.lock or package-lock.json file? Docusaurus website is running at: http://localhost:3000/
5, browse this page: https://stackoverflow.com/questions/63745006/how-can-i-fix-versioning-error-in-docusaurus
6, yarn upgrade
7, yarn start Failed to compile ./versioned_docs/version-5.x/devtools.md Error: Image static\static\img\demo-with-importmapoverrides.png used in versioned_docs\version-5.x\devtools.md not found.
8, change "/static/img/demo-with-importmapoverrides.png" to "/img/demo-with-importmapoverrides.png"
9, ./versioned_docs/version-5.x/create-single-spa.md Error: Markdown link url is mandatory. filePath=versioned_docs\version-5.x\create-single-spa.md, title=single-spa-angular, line=85
10, change "Angular使用Angular CLI和[single-spa-angular]'()'" to "Angular使用Angular CLI和[single-spa-angular]'(https://github.com/single-spa/single-spa-angular/)'"
11, finally start the project successfully.

I think this was also reported in https://github.com/single-spa/zh-hans.single-spa.js.org/issues/154.
I am able to start the project without any modifications. What os, nodejs version, and yarn version are you using? Maybe try clearing node_modules, and also yarn.lock, then try again?
~/c/zh-hans.single-spa.js.org (master|✔) $ cd website
~/c/z/website (master|✔) $ rm -rf node_modules
yarn
~/c/z/website (master|✔) $ yarn
yarn install v1.22.10
warning package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0".
warning "@docusaurus/preset-classic > @docusaurus/theme-classic > [email protected]" has unmet peer dependency "prop-types@^15.3.0 || ^16.0.0".
[4/4] 🔨 Building fresh packages...
✨ Done in 24.05s.
~/c/z/website (master|✔) $ yarn start
yarn run v1.22.10
warning package.json: No license field
$ docusaurus start
Starting the development server...
(node:45278) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:45278) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:45278) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
✔ Client
Compiled successfully in 10.70s
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/joeldenning/code/zh-hans.single-spa.js.org/website
ℹ 「wds」: 404s will fallback to /index.html
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
✔ Client
Compiled successfully in 133.85ms

My PC config: Windows 10 Family Chinese, node.js v10.16.3, yarn v1.22.4.
1, delete modified zh-hans.single-spa.js.org project. 2, pull latest zh-hans.single-spa.js.org.
3, delete package-lock.json, node_modules and yarn.lock.
4, yarn install
5, yarn start
6, Error: It is not possible to use docs without any version. Please check the configuration of these options: includeCurrentVersion=undefined disableVersioning=undefined
7, upgrade node.js to v14.15.3
8, delete yarn.lock and node_modules 9, yarn install 10, yarn start 11, Error: It is not possible to use docs without any version. Please check the configuration of these options: includeCurrentVersion=undefined disableVersioning=undefined

Don't delete the yarn.lock - you should use the yarn.lock that's in the repository.
I tried, but it didn't work. I record the whole process and upload to YouTube(https://www.youtube.com/watch?v=pVLlK2Y7gOo). Need you help, thanks!



It appears you may be installing the incorrect version of @docusaurus/plugin-content-docs. The yarn.lock requires 2.0.0-alpha.37. See code below:
https://github.com/single-spa/zh-hans.single-spa.js.org/blob/59b956207f880e29ee692a9dbd82ec3d78ceda41/website/yarn.lock#L953
However, your stacktrace is from a different version, because it references node_modules/@docusaurus/plugin-content-docs/lib/versions.js, which does not exist in 2.0.0-alpha.37. See https://unpkg.com/browse/@docusaurus/[email protected]/lib/ which shows that version.js exists, but that versions.js does not exist. Also notice that version.js only has 88 lines, but your stacktrace refers to line 200.
One thing I noticed is that website/package-lock.json exists, but it should not. Adding that file was a mistake in https://github.com/single-spa/zh-hans.single-spa.js.org/commit/9c2e90f7ea8eded0941404d4bdba75e3aa02d427#diff-999051457a1934c824a5f8395589ea5e749a581e9f70a43585c885319cb56e64. That is why you're seeing the warning below:
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
I have removed the package-lock.json in https://github.com/single-spa/zh-hans.single-spa.js.org/commit/f1c22084734fc22635797075422f51c25087f727. However, I do not think that will fix the issue.
Next steps
I do not know why yarn install is not using the versions in the yarn.lock file for you. That is the root cause of the issue. I would verify that the yarn.lock file exists in your cloned repository, and that it has @docusaurus/[email protected] in it. If it does, I would look in the Yarn github issue queue and documentation to try to understand why the version in the yarn.lock is not being used.
These are my version.js file and yarn.lock file.


C:\Users\Jiang λ d:
D:\backupData\software\frontEnd\cmder1.3.2\config\profile.d λ cd D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa λ ls zh-hans.single-spa.js.org
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa λ rm -rf zh-hans.single-spa.js.org\
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa λ git clone https://hub.fastgit.org/single-spa/zh-hans.single-spa.js.org.git Cloning into 'zh-hans.single-spa.js.org'... remote: Enumerating objects: 431, done. remote: Counting objects: 100% (431/431), done. remote: Compressing objects: 100% (96/96), done. remote: Total 20761 (delta 191), reused 367 (delta 157), pack-reused 20330R Receiving objects: 100% (20761/20761), 21.35 MiB | 714.00 KiB/s, done. Resolving deltas: 100% (11482/11482), done.
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa λ cd zh-hans.single-spa.js.org\website\
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website (master) λ yarn yarn install v1.22.10 warning package.json: No license field warning No license field [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/[email protected]" has incorrect peer dependency "@docusaurus/core@^2.0.0". warning "@docusaurus/preset-classic > @docusaurus/theme-classic > [email protected]" has unmet peer dependency "prop-types@^15.3.0 || ^16.0.0". [4/4] Building fresh packages... Done in 16.91s.
D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website (master) λ yarn start yarn run v1.22.10 warning package.json: No license field $ docusaurus start Starting the development server...
× Client Compiled with some errors in 5.80s
i 「wds」: Project is running at http://localhost:3000/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website
i 「wds」: 404s will fallback to /index.html
Browserslist: caniuse-lite is outdated. Please run next command yarn upgrade
./.docusaurus/registry.js SyntaxError: D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website.docusaurus\registry.js: Bad character escape sequence (8:163)
6 | 'component---site-src-pages-index-jsece-a18': [() => import(/* webpackChunkName: 'component---site-src-pages-index-jsece-a18' / "@site/src\pages\index.js"), "@site/src\pages\index.js", require.resolveWeak("@site/src\pages\index.js")], 7 | 'component---site-src-pages-languages-index-js-675-22d': [() => import(/ webpackChunkName: 'component---site-src-pages-languages-index-js-675-22d' */ "@site/src\pages\languages\index.js"), "@site/src\pages\languages\index.js", require.resolveWeak("@site/src\pages\languages\index.js")],
8 | 'component---site-src-pages-users-index-jsc-91-f50': [() => import(/* webpackChunkName: 'component---site-src-pages-users-index-jsc-91-f50' / "@site/src\pages\users\index.js"), "@site/src\pages\users\index.js", require.resolveWeak("@site/src\pages\users\index.js")], | ^ 9 | 'component---site-src-pages-versions-index-js-134-340': [() => import(/ webpackChunkName: 'component---site-src-pages-versions-index-js-134-340' / "@site/src\pages\versions\index.js"), "@site/src\pages\versions\index.js", require.resolveWeak("@site/src\pages\versions\index.js")], 10 | 'component---theme-blog-list-pagea-6-a-7ba': [() => import(/ webpackChunkName: 'component---theme-blog-list-pagea-6-a-7ba' / "@theme/BlogListPage"), "@theme/BlogListPage", require.resolveWeak("@theme/BlogListPage")], 11 | 'component---theme-blog-post-pageccc-cab': [() => import(/ webpackChunkName: 'component---theme-blog-post-pageccc-cab' */ "@theme/BlogPostPage"), "@theme/BlogPostPage", require.resolveWeak("@theme/BlogPostPage")], @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js 6:159-201 17:305-313 @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./.docusaurus/client-modules.js Module not found: Can't resolve 'DackupDataJiangFanBackup_Tech♀rontEndprojectssingle-spazh-hans.single-spa.js.orgwebsitestaticcsscustom.css' in 'D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website.docusaurus'
× Client Compiled with some errors in 89.66ms
./.docusaurus/registry.js SyntaxError: D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website.docusaurus\registry.js: Bad character escape sequence (8:163)
6 | 'component---site-src-pages-index-jsece-a18': [() => import(/* webpackChunkName: 'component---site-src-pages-index-jsece-a18' / "@site/src\pages\index.js"), "@site/src\pages\index.js", require.resolveWeak("@site/src\pages\index.js")], 7 | 'component---site-src-pages-languages-index-js-675-22d': [() => import(/ webpackChunkName: 'component---site-src-pages-languages-index-js-675-22d' */ "@site/src\pages\languages\index.js"), "@site/src\pages\languages\index.js", require.resolveWeak("@site/src\pages\languages\index.js")],
8 | 'component---site-src-pages-users-index-jsc-91-f50': [() => import(/* webpackChunkName: 'component---site-src-pages-users-index-jsc-91-f50' / "@site/src\pages\users\index.js"), "@site/src\pages\users\index.js", require.resolveWeak("@site/src\pages\users\index.js")], | ^ 9 | 'component---site-src-pages-versions-index-js-134-340': [() => import(/ webpackChunkName: 'component---site-src-pages-versions-index-js-134-340' / "@site/src\pages\versions\index.js"), "@site/src\pages\versions\index.js", require.resolveWeak("@site/src\pages\versions\index.js")], 10 | 'component---theme-blog-list-pagea-6-a-7ba': [() => import(/ webpackChunkName: 'component---theme-blog-list-pagea-6-a-7ba' / "@theme/BlogListPage"), "@theme/BlogListPage", require.resolveWeak("@theme/BlogListPage")], 11 | 'component---theme-blog-post-pageccc-cab': [() => import(/ webpackChunkName: 'component---theme-blog-post-pageccc-cab' */ "@theme/BlogPostPage"), "@theme/BlogPostPage", require.resolveWeak("@theme/BlogPostPage")], @ ./node_modules/@docusaurus/core/lib/client/exports/ComponentCreator.js 6:159-201 17:305-313 @ ./.docusaurus/routes.js @ ./node_modules/@docusaurus/core/lib/client/clientEntry.js @ multi (webpack)-dev-server/client?http://localhost (webpack)/hot/dev-server.js ./node_modules/@docusaurus/core/lib/client/clientEntry.js./.docusaurus/client-modules.js Module not found: Can't resolve 'DackupDataJiangFanBackup_Tech♀rontEndprojectssingle-spazh-hans.single-spa.js.orgwebsitestaticcsscustom.css' in 'D:\backupData\JiangFanBackup_Tech\frontEnd\projects\single-spa\zh-hans.single-spa.js.org\website.docusaurus'
I notice that the log of cmd "yarn" is different from yours.

Try upgrading to NodeJS 14.