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

Help me - could not resolve module angular/node_modules/mermaid/dist/mermaid.js #55657

Closed
fendypurnomo opened this issue May 3, 2024 · 4 comments · Fixed by angular/dev-infra#2047
Assignees
Labels
area: docs-infra Angular.dev application and infrastructure needs: clarification This issue needs additional clarification from the reporter before the team can investigate.
Milestone

Comments

@fendypurnomo
Copy link

fendypurnomo commented May 3, 2024

Describe the problem that you experienced

Administrator@DESKTOP-19BVUE8 MINGW64 /d/Applications/docs/angular.io
$ yarn run docs
yarn run v1.22.19

warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
$ [[ -n $CI ]] && echo 'Cannot run this yarn script on CI' && exit 1 || yarn bazel run //adev:serve --fast_adev
'[[' is not recognized as an internal or external command,
operable program or batch file.

warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
$ D:\Applications\docs\angular.io\node_modules\.bin\bazel run //adev:serve --fast_adev    
Starting local Bazel server and connecting to it...
... still trying to connect to local Bazel server after 10 seconds ...
INFO: Analyzed target //adev:serve (1384 packages loaded, 84466 targets configured).      
INFO: Found 1 target...
INFO: From Bundling JavaScript packages/core/primitives/event-dispatch/contract_bundle.js 
[rollup]:

bazel-out/x64_windows-fastbuild-ST-2e5f3376adb5/bin/packages/core/primitives/event-dispatch/contract_binary.mjs → bazel-out/x64_windows-fastbuild-ST-2e5f3376adb5/bin/packages/core/primitives/event-dispatch/contract_bundle.js...
created bazel-out/x64_windows-fastbuild-ST-2e5f3376adb5/bin/packages/core/primitives/event-dispatch/contract_bundle.js in 1.1s

ERROR: D:/applications/docs/angular.io/adev/src/content/guide/components/BUILD.bazel:3:16: Action adev/src/content/guide/components/advanced-configuration.md.html failed: (Exit 1): markdown.bat failed: error executing command bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\npm\@angular\docs\pipeline\markdown.bat ... (remaining 2 arguments skipped)      
Error: could not resolve module angular/node_modules/mermaid/dist/mermaid.js
Please report this to https://github.com/markedjs/marked.
    at Runfiles.resolve (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48611:19)
    at Runfiles.resolveWorkspaceRelative (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48620:21)   
    at getMermaidScriptTagData (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48699:36)
    at Object.processMermaidCodeBlock (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48712:29)      
    at runNextTicks (node:internal/process/task_queues:60:5)
    at processImmediate (node:internal/timers:447:9)
    at async Promise.all (index 265)
    at main (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:52239:31)

ERROR: D:/applications/docs/angular.io/adev/src/content/introduction/essentials/BUILD.bazel:3:16: Action adev/src/content/introduction/essentials/components.md.html failed: (Exit 1): markdown.bat failed: error executing command bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\npm\@angular\docs\pipeline\markdown.bat bazel-out/x64_windows-fastbuild/bin/adev/src/content/introduction/essentials/components.md.html-0.params ... (remaining 1 argument skipped)
Error: could not resolve module angular/node_modules/mermaid/dist/mermaid.js
Please report this to https://github.com/markedjs/marked.
    at Runfiles.resolve (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48611:19)
    at Runfiles.resolveWorkspaceRelative (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48620:21)   
    at getMermaidScriptTagData (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48699:36)
    at Object.processMermaidCodeBlock (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:48712:29)      
    at async Promise.all (index 7)
    at main (file:///D:/programs/vcs/git/cmd/_bazel_administrator/qjhjlh55/execroot/angular/external/npm/@angular/docs/pipeline/guides.mjs:52239:31)
Target //adev:serve failed to build    
Use --verbose_failures to see the command lines of failed build steps.

ERROR: D:/applications/docs/angular.io/adev/src/assets/BUILD.bazel:5:18 Copying files to directory failed: (Exit 1): markdown.bat failed: error executing command bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\npm\@angular\docs\pipeline\markdown.bat bazel-out/x64_windows-fastbuild/bin/adev/src/content/introduction/essentials/components.md.html-0.params 
... (remaining 1 argument skipped)

INFO: Elapsed time: 1630.401s, Critical Path: 344.29s
INFO: 725 processes: 50 internal, 426 local, 249 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.      
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@alan-agius4 alan-agius4 transferred this issue from angular/angular May 3, 2024
@alan-agius4 alan-agius4 transferred this issue from angular/angular-cli May 3, 2024
@JeanMeche
Copy link
Member

Hi, can you check if mermaid is present in your node_modules ?

@alan-agius4
Copy link
Contributor

I suspect that angular/dev-infra#2047 should fix it.

alan-agius4 added a commit to alan-agius4/dev-infra that referenced this issue May 3, 2024
This is required by the docs pipeline

Should fix angular/angular#55657
alan-agius4 added a commit to alan-agius4/dev-infra that referenced this issue May 3, 2024
This is required by the docs pipeline

Should fix angular/angular#55657
@alan-agius4 alan-agius4 added the area: docs-infra Angular.dev application and infrastructure label May 3, 2024
@ngbot ngbot bot added this to the needsTriage milestone May 3, 2024
@alan-agius4 alan-agius4 self-assigned this May 3, 2024
@alan-agius4 alan-agius4 reopened this May 3, 2024
@alan-agius4
Copy link
Contributor

Can you please verify if the problem is solved?

@alan-agius4 alan-agius4 reopened this May 3, 2024
@alan-agius4 alan-agius4 added the needs: clarification This issue needs additional clarification from the reporter before the team can investigate. label May 3, 2024
@fendypurnomo fendypurnomo closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@devversion
Copy link
Member

I think the issue is that angular/dev-infra resolves mermaid incorrectly. It should resolve from npm/node_modules/mermaid (a bazel rootpath that also works on Windows).

@fendypurnomo feel free to try sending a PR in angular/dev-infra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docs-infra Angular.dev application and infrastructure needs: clarification This issue needs additional clarification from the reporter before the team can investigate.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@JeanMeche @devversion @alan-agius4 @fendypurnomo and others