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

Can't run npx happo-e2e standalone #4

Open
trotzig opened this issue Aug 7, 2022 · 1 comment
Open

Can't run npx happo-e2e standalone #4

trotzig opened this issue Aug 7, 2022 · 1 comment

Comments

@trotzig
Copy link
Contributor

trotzig commented Aug 7, 2022

When running npx happo-e2e -- <cmd> as a standalone command without first installing happo-e2e and happo.io npm libraries locally, the command fails with the following error:

Error: Cannot find module 'happo.io/build/makeRequest'
Require stack:
- ./happo-e2e/bin/happo-e2e.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (node_modules/happo-e2e/bin/happo-e2e.js:6:21)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)

This is because happo.io isn't listed as a direct dependency of happo-e2e.

When running npx happo-e2e -- <cmd> with both happo.io and happo-e2e installed locally (in node_modules) the command will work.

@trotzig
Copy link
Contributor Author

trotzig commented Oct 10, 2022

A possible workaround is to invoke npx happo-e2e --package happo.io -- <cmd>. This should install the necessary dependency before the command is invoked.

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

1 participant