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

Error: net::ERR_ACCESS_DENIED on /@mermaid-js/mermaid-cli/dist/index.html #641

Open
qzhuyan opened this issue Feb 1, 2024 · 2 comments
Open

Comments

@qzhuyan
Copy link

qzhuyan commented Feb 1, 2024

Describe the bug
just run simple example code give me error as following:

Error: net::ERR_ACCESS_DENIED at file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html

but the file has the right permissions (cat file also works), suspect the error code is miss translated.

ls -alt /home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html
-rw-rw-r-- 1 ubuntu docker 5757725 Feb  1 09:38 /home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html

To Reproduce

Steps to reproduce the behavior:

  1. fresh install
    npm install -g @mermaid-js/mermaid-cli

  2. then run

cat << EOF  | mmdc --input -
    graph TD
    A[Client] --> B[Load Balancer]
EOF
Generating single mermaid chart

Error: net::ERR_ACCESS_DENIED at file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html
    at navigate (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Frame.js:215:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Frame.goto (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Frame.js:181:21)
    at async CDPPage.goto (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js:435:16)
    at async renderMermaid (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:242:5)
    at async parseMMD (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:218:20)
    at async run (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:479:20)
    at async cli (file:///home/ubuntu/.asdf/installs/nodejs/21.6.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:184:3)

Expected behavior
Should success and no error

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: ubuntu22.04 (ARM64)
uname -a
Linux dev 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:29:11 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

  • Browser: chromium
    installed with
apt install chromium-browser chromium-codecs-ffmpeg
  • Version [e.g. 22]
mmdc --version
10.7.0

Additional context
node version:

node -v
v21.6.0

@jmruiza
Copy link

jmruiza commented May 30, 2024

I can't install either

npm install -g @mermaid-js/mermaid-cli
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@mermaid-js%2fmermaid-cli failed, reason: connect ETIMEDOUT 2606:4700::6810:1b22:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config

node -v v18.18.0

@aloisklink
Copy link
Member

@jmruiza, it seems like your issue is unrelated.

Can you access https://registry.npmjs.org/@mermaid-js%2fmermaid-cli in your browser?

It seems like you might have internet connectivity issues with npm. It might be worth looking at npm/npm#17064 or https://stackoverflow.com/q/28722515 for tips on how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants