-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
error building locale=en TypeError: Cannot read property 'intercept' of undefined #4709
Comments
Have you tried docusaurus clear?
Le ven. 30 avr. 2021 à 22:23, MG. ***@***.***> a écrit :
… 🐛 Bug Report
Cannot build docs on 2.0.0-alpha.75, 2.0.0-alpha.74 works well.
Have you read the Contributing Guidelines on issues
<https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md#reporting-new-issues>
?
Yes
To Reproduce
1. The issue is here help-me-mom/ng-mocks#466
<help-me-mom/ng-mocks#466>
2. Clone the repo
3. Switch to branch renovate/root/patch-docusaurus-monorepo
4. execute npm install
5. execute npm run build:docs
Expected behavior
The build should succeed.
Actual Behavior
Fails with the next error
[en] Creating an optimized production build...
[info] [webpackbar] Compiling Client
error building locale=en
TypeError: Cannot read property 'intercept' of undefined
at /Users/michael/projects/ng-mocks/node_modules/webpack/lib/ProgressPlugin.js:242:30
at Array.forEach (<anonymous>)
at /Users/michael/projects/ng-mocks/node_modules/webpack/lib/ProgressPlugin.js:239:24
at Hook.eval [as call] (eval at create (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:100:1)
at Hook.CALL_DELEGATE [as _call] (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation ***@***.***/core/node_modules/webpack/lib/Compiler.js:1031:26)
at ***@***.***/core/node_modules/webpack/lib/Compiler.js:1073:29
at Hook.eval [as callAsync] (eval at create (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile ***@***.***/core/node_modules/webpack/lib/Compiler.js:1068:28)
at ***@***.***/core/node_modules/webpack/lib/Compiler.js:496:12
at Compiler.readRecords ***@***.***/core/node_modules/webpack/lib/Compiler.js:908:11)
at ***@***.***/core/node_modules/webpack/lib/Compiler.js:493:11
at Hook.eval [as callAsync] (eval at create (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/michael/projects/ng-mocks/node_modules/tapable/lib/Hook.js:18:14)
at ***@***.***/core/node_modules/webpack/lib/Compiler.js:490:20
Your Environment
- Public source code: help-me-mom/ng-mocks#466
<help-me-mom/ng-mocks#466>
- Public site url:
- Docusaurus version used: 2.0.0-alpha.75
- Environment name and version (e.g. Chrome 78.0.3904.108, Node.js
10.17.0): not relevant, fails on linux and macos
- Operating system and version (desktop or mobile): desktop
Reproducible Demo
https://app.circleci.com/pipelines/github/ike18t/ng-mocks/269/workflows/e0a901b4-03ab-4288-a0b1-34398ecd8204/jobs/7723/parallel-runs/0/steps/0-110
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4709>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW6PQFI5SINGF232WF5ITTLMGUFANCNFSM435MZZZA>
.
|
There is no cache on my CI and docs are built from scratch on every commit, but I'll try it in some hours. |
I see
Not in front of a computer atm but found your setup a bit weird. Why do you
have docusaurus deps in 2 different packages
Le sam. 1 mai 2021 à 10:49, MG. ***@***.***> a écrit :
… There is no cache on my CI and docs are build from scratch on every
commit, but I'll try it in some hours.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4709 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW6PW5HIH3LV3GHHIPUNDTLO6C5ANCNFSM435MZZZA>
.
|
The idea is to follow monorepo approach. There is one global I'll try to play with |
I am experiencing the same issue with 2.0.0-alpha.75 with i18n - https://pastebin.com/inhL60ap 2.0.0-alpha.72 works but the i18n url breaks if there is a baseURL configured |
@wibed I don't understand how your problem is related to the current issue. This issue is a alpha 74 -> 75 upgrade problem. Please open another issue with a repro repository that I can inspect. |
@slorber indeed it does not. Ive mistakenly took the error, based on the message, for a similar problem. Ive been able to fix my issue, by rebuilding on the new .75 version bit by bit. |
This is not a problem in Docusaurus, but it is a problem in your repo @satanTime After upgrading to alpha.75 (now on Webpack 5), you still end up with It is your responsibility to not mess-up with the dependencies and ensure that Docusarus is able to use the Webpack version it needs, and I think your setup mess-up with the dependencies. If you are not using npm/yarn workspaces and the hoisting features permitting multiple webpack versions to cohabit, you should then rather install docusaurus deps independently in the docs subfolder. Eventually, you could try to add "webpack@5" at the root of your monorepo, it might permit Docusaurus to build, but it might break other things of your repo... this is not a solution I'd recommend. This PR shows that your site can definitively build using latest Docusaurus: help-me-mom/ng-mocks#475 |
Hi @slorber, thanks for the info... that is the thing I was afraid of. I tried webpack@5 in the global package.json but it didn't work out unfortunately. PS. Frankly speaking, I don't understand benefit of having a single package.json with all the deps... maybe one day... thanks again. |
I don't know either 😅 you can't expect this strategy to remain sustainable over time particularly when your monorepo packages have different lifecycles and dependencies |
yes, exactly :) I remember reading |
@satanTime How did u resolve the issue? Moved the docusaurus to its own repo? |
Hi @satanTime, not moving, but allowing it having own node_modules, before it had to be Unfortunately, I wasn't able to make friends angular with webpack4 and docusaurus with webpack5 with a single package.json |
🐛 Bug Report
Cannot build docs on
2.0.0-alpha.75
,2.0.0-alpha.74
works well.Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
renovate/root/patch-docusaurus-monorepo
npm install
npm run build:docs
Expected behavior
The build should succeed.
Actual Behavior
Fails with the next error
Your Environment
2.0.0-alpha.75
Reproducible Demo
https://app.circleci.com/pipelines/github/ike18t/ng-mocks/269/workflows/e0a901b4-03ab-4288-a0b1-34398ecd8204/jobs/7723/parallel-runs/0/steps/0-110
The text was updated successfully, but these errors were encountered: