Cryrivers / manta-style

🚀 The futuristic API Mock Server for Frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to install globally?

wgao19 opened this issue · comments

I installed

npm install --save-dev @manta-style/cli @manta-style/plugin-builder-typescript @manta-style/plugin-mock-example

to project only and it doesn't work.
Reports no ms command found.
I had to install the cli globally for it to work.

no leh, just install @manta-style/cli, you should be able to find ms file in node_modules/.bin/ and you can do yarn ms ....

I see. Thanks!

My machine might be problematic, but have anyone of you encountered this error while installing the cli?

error An unexpected error occurred: "Running this command will add the dependency to the workspace root rather than workspace itself, which might not be what you want - if you really meant it, │spawn ssh-add /Users/gaow/.ssh/wgao19_rsa
make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).".

I never saw this with other libraries, though.

Oh yes, this is lerna's warning, if you add dependency to a single package without using lerna cmd, it will complain like this. So just use -W flag, if you are sure to add dependency to single package, it's fine.

I actually also encountered the problem where it complains I did not add @manta-style/core, should add this manually as well?
Pondering what I should write on the docs 😂

Wait, are u trying to add gitbook on root?

No, I haven't worked on gitbook hook yet.

error An unexpected error occurred: "Running this command will add the dependency to the workspace root rather than workspace itself, which might not be what you want - if you really meant it, │spawn ssh-add /Users/gaow/.ssh/wgao19_rsa
make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).".

@wgao19 where did you see this error? you adding a dependency in the root folder of manta style?

@wgao19 where did you see this error? you adding a dependency in the root folder of manta style?

@tanhauhau Yes I saw this error when I tried to add in root folder by running yarn add -D @manta-style/cli

as discussed in MM, we shouldn't allow users to install @manta-style/cli globally at the moment. because:

  • our plugin discovery is unable to discover global plugins at the moment
  • global plugins might not have the plugin that a config file requires

for installation, sorry, the cli with latest architecture is only prereleased. you might have to run:

yarn add -D @manta-style/cli@0.2.0-alpha.4

for gitbook thing, we need to make sure all our mock plugins, transformer, core packages support to run on both Node and browsers.

@tanhauhau Yes I saw this error when I tried to add in root folder by running yarn add -D @manta-style/cli
why did you want to install @manta-style/cli in the root folder?

@tanhauhau i think she was trying the stuff in README.md. Previously it said Manta Style could be installed globally.

@Cryrivers I see, thanks for clarifying. It will still take a while to complete the docs I think. If by the time the docs are ready but pending some minor fixes, we can always put a link to the issue. Will close this ticket for now. We can clean things up later (hopefully before next release) :P

why did you want to install @manta-style/cli in the root folder?

@wgao19 oh btw if you want to use manta style in manta-style repo, you have to create a new package under packages folder, and let lerna do the linking work. by right you cannot install them in root.