Comments (7)
I've tried to use npm to install it for the first time, it gave me this error:
kotov@kotov-office:~/Apps/mermaid-cli$ npm install @mermaid-js/mermaid-cli
> [email protected] install /home/kotov/Apps/mermaid-cli/node_modules/puppeteer
> node install.js
(node:21308) UnhandledPromiseRejectionWarning: /home/kotov/Apps/mermaid-cli/node_modules/puppeteer/lib/cjs/puppeteer/install.js:134
catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at download (/home/kotov/Apps/mermaid-cli/node_modules/puppeteer/install.js:35:7)
(node:21308) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21308) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
npm WARN saveError ENOENT: no such file or directory, open '/home/kotov/Apps/mermaid-cli/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/kotov/Apps/mermaid-cli/package.json'
npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN mermaid-cli No description
npm WARN mermaid-cli No repository field.
npm WARN mermaid-cli No README data
npm WARN mermaid-cli No license field.
+ @mermaid-js/[email protected]
added 63 packages from 77 contributors and audited 63 packages in 5.191s
found 0 vulnerabilities
After that I've deleted node_modules
and installed it via yarn
, and now I have the error in the description.
Is there anything wrong with my system now? Maybe I should uninstall something or delete some files to make it work?
from mermaid-cli.
@vkotovv : I just tried with the docker image, where we install the newly released mermaid cli and it worked fine:
docker run minlag/mermaid-cli:8.7.0 -h
I will try to reproduce the error by installing locally. ETA: sometime next week.
from mermaid-cli.
@vkotovv : I cannot reproduce the error:
root@f49fbe021825:/# yarn add @mermaid-js/mermaid-cli
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 60 new dependencies.
info Direct dependencies
└─ @mermaid-js/[email protected]
info All dependencies
├─ @mermaid-js/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Done in 11.92s.
root@f49fbe021825:/# ./node_modules/.bin/mmdc -h
Usage: mmdc [options]
Options:
-V, --version output the version number
-t, --theme [theme] Theme of the chart, could be default, forest, dark or neutral. Optional. Default: default (default: "default")
-w, --width [width] Width of the page. Optional. Default: 800 (default: "800")
-H, --height [height] Height of the page. Optional. Default: 600 (default: "600")
-i, --input <input> Input mermaid file. Required.
-o, --output [output] Output file. It should be either svg, png or pdf. Optional. Default: input + ".svg"
-b, --backgroundColor [backgroundColor] Background color. Example: transparent, red, '#F0F0F0'. Optional. Default: white
-c, --configFile [configFile] JSON configuration file for mermaid. Optional
-C, --cssFile [cssFile] CSS file for the page. Optional
-s, --scale [scale] Puppeteer scale factor, default 1. Optional
-p --puppeteerConfigFile [puppeteerConfigFile] JSON configuration file for puppeteer. Optional
-h, --help display help for command
from mermaid-cli.
@vkotovv : I would suggest to upgrade yarn if you are not using the newest. Another thing, you can try to use node
docker image for your experiments. This way you can try to compare your system setup with the one in the docker image. I hope this helps!
from mermaid-cli.
Still the same error after upgrading yarn to 1.22.4.
from mermaid-cli.
I can confirm this error using npm 6.14.8 on Ubuntu 18.04
from mermaid-cli.
We have released many new versions of mermaid-cli since then. I will close this issue. Please, reopen if you disagree.
from mermaid-cli.
Related Issues (20)
- Using a config file does not work HOT 1
- Frontformatter config is not respected HOT 3
- No charts found when space between opening code fence and language name HOT 3
- Upgrade puppeteer HOT 1
- Unable to resolve types with TypeScript 5.3.3 / TSC 9.2.0 HOT 1
- Apply styles from inside mermaid graphs
- Bug: CSS Styling Not Applied to SVG (only PNG / static image)
- Add types for exports
- How can I configure maxEdges using the CLI? (Error: Too many edges) HOT 1
- Error: net::ERR_ACCESS_DENIED on /@mermaid-js/mermaid-cli/dist/index.html
- Error: Could not find Chromium (rev. 1108766) HOT 7
- Syntax Error in Mermaid-cli tool HOT 1
- background of edge label is white in pdf from flowchart
- Missing description in `-h, --help`
- Custom image output for .md file input
- SyntaxError: The requested module `@mermaid-js/mermaid-cli` does not provide an export named 'run' (via SyntaxError) HOT 1
- Formatting of diagram is changed when exported to svg, pdf or png
- Could not find Chromium (rev. 1108766) HOT 4
- Upgrade mermaid to 10.9.0 (Latex support) HOT 2
- Write output to stdout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mermaid-cli.