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

Broken airnode-validator package version 0.7.0 #1246

Closed
dcroote opened this issue Jun 19, 2022 · 10 comments
Closed

Broken airnode-validator package version 0.7.0 #1246

dcroote opened this issue Jun 19, 2022 · 10 comments
Assignees
Labels
bug Something needs to be fixed validator About the @airnode/validator package
Milestone

Comments

@dcroote
Copy link
Contributor

dcroote commented Jun 19, 2022

Description

Attempting to use version 0.7.0 of the airnode-validator package with npx fails due to a missing file. This is not the case for 0.6.5, see below.

Version

  • node: v14.19.3

Present Behaviour

Error due to missing file

Expected Behaviour

Command should return package help contents

Steps to reproduce

Works for 0.6.5:

> npx @api3/[email protected] --help
npx: installed 68 in 24.543s
Options:
      --help                    Show help                              [boolean]
      --version                 Show version number                    [boolean]
      --from                    Name of the source airnode specification format
                                                                        [string]
      --to                      Name of the target airnode specification format
                                                                        [string]
  -t, --template                Path to validator template file         [string]
  -s, --specification, --specs  Path to specification file that will be
                                validated                    [string] [required]
  -i, --secrets                 Path to .env file that will be interpolated with
                                specification                           [string]
      --specs-only              Instead of standard validator output, only the
                                result of conversion will be returned
                                                      [boolean] [default: false]

Does not work for 0.7.0:

> npx @api3/[email protected] --help
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/derek/.npm/_npx/19455/lib/node_modules/@api3/airnode-validator/dist/bin/validator.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/derek/.npm/_npx/19455/lib/node_modules/@api3/airnode-validator/dist/bin/valida
tor.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/derek/.npm/_logs/2022-06-19T17_13_02_092Z-debug.log
Install for [ '@api3/[email protected]' ] failed with code 254
@dcroote dcroote added bug Something needs to be fixed validator About the @airnode/validator package labels Jun 19, 2022
@dcroote dcroote assigned dcroote and Siegrift and unassigned dcroote and Siegrift Jun 19, 2022
@amarthadan amarthadan modified the milestones: 0.8.0, 0.7.1 Jun 20, 2022
@aquarat
Copy link
Contributor

aquarat commented Jun 20, 2022

I can confirm this issue. It is being investigated. Thanks for reporting :)

@amarthadan
Copy link
Contributor

amarthadan commented Jun 20, 2022

I can confirm this issue. It is being investigated. Thanks for reporting :)

@aquarat If you're working on it please assign the task to yourself and move it to In progress 😉

@Siegrift Siegrift self-assigned this Jun 20, 2022
@Siegrift
Copy link
Contributor

There was an unknown issue in local installation of npm and reinstalling npm solved the issue. See: https://api3workspace.slack.com/archives/C02AYRX8D89/p1655719143552109?thread_ts=1655471779.990269&cid=C02AYRX8D89

@martinkolenic
Copy link
Contributor

Hi @Siegrift, it seems that the issue persists even with v0.7.1. See screenshot:
Image

@Siegrift
Copy link
Contributor

Just to clarify, this is a different issue (the previous was just some broken npm version on @aquarat machine), this one is my fault when I changed the TS configurations.

@dcroote dcroote reopened this Jun 20, 2022
@Siegrift
Copy link
Contributor

The fix for master has been merged in #1268.

This can be tested by:

  1. Publishing the validator package to verdacio
  2. Unforunately, it seems it's not possible to run npx with local registry, but this can be tested by using the validator in another project as dependency (I believe we have that somewhere in docs)
  3. Trying to call yarn airnode-validator --help (from the new project) to see if the help popup shows up

LMK if you have troubles testing this.

@Siegrift Siegrift assigned martinkolenic and unassigned Siegrift Jun 21, 2022
@martinkolenic
Copy link
Contributor

martinkolenic commented Jun 21, 2022

Hi, @Siegrift, Aaron has published the package in the meantime and it does work.

@Siegrift
Copy link
Contributor

Siegrift commented Jun 21, 2022

@kolenic-martin but this should have been tested from master since the issue was patched to both branches (master and v0.7).

@martinkolenic
Copy link
Contributor

Ah, I see now, that I didn't know. I'll try it the way you advised.

@martinkolenic
Copy link
Contributor

martinkolenic commented Jun 22, 2022

To everyone concerned: this has been tested from master in the morning the following way:

  • git pull
  • npm install verdaccio
  • [ran verdaccio in a separate console and pointed the npm registry to the local instance of verdaccio]
  • cd packages/airnode-validator
  • yarn publish
  • [switched to a dummy nodejs project and installed airnode-validator]
  • npx @api3/airnode-validator --help

This produced a standard message that the validator usually displays, confirming it runs without any issues now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something needs to be fixed validator About the @airnode/validator package
Projects
None yet
Development

No branches or pull requests

5 participants