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

mock-server fails global installation #398

Closed
LexLuengas opened this issue Oct 27, 2022 · 0 comments · Fixed by #403
Closed

mock-server fails global installation #398

LexLuengas opened this issue Oct 27, 2022 · 0 comments · Fixed by #403

Comments

@LexLuengas
Copy link
Collaborator

Problem

Preinstall script fails installation. npm install -g @exxeta/openapi-cop results in:

> @exxeta/[email protected] preinstall:development /home/allu/.nvm/versions/node/v10.24.1/lib/node_modules/@exxeta/openapi-cop
> cd mock-server && npm install

sh: line 1: cd: mock-server: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @exxeta/[email protected] preinstall:development: `cd mock-server && npm install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @exxeta/[email protected] preinstall:development script.

Reason

Since per-env defaults NODE_ENV to "development", the "preinstall:development" script is executed, which tries to install the mock server.

Workaround solution

  • Set preinstall script to (test -d mock-server && cd mock-server && npm install) || true to be more forgiving.

Proposed solution

  • Publish mock-server separately.
  • Move mock-server to its own repository.
    This would remove the necessity to install the dependencies of mock-server altogether.
@LexLuengas LexLuengas changed the title mock-server fails global installation with npm mock-server fails global installation and docker build Oct 27, 2022
@LexLuengas LexLuengas changed the title mock-server fails global installation and docker build mock-server fails global installation Oct 27, 2022
@LexLuengas LexLuengas linked a pull request Dec 9, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant