apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
91 stars 71 forks source link

changes how peggy is invoked on postinstall #408

Closed gislikonrad closed 7 months ago

gislikonrad commented 8 months ago

The postinstall script was attempting to invoke peggy from the node_modules folder directly. This works fine when manually running the postinstall script from the apigeelint repo, but fails when the package is being installed from npm.

I changed the invocation from invoking peggy directly to using npx.

Solves issue #407

ssvaidyanathan commented 7 months ago

@gislikonrad - I get the following error when I try to install apigeelint globally on my machine using sudo npm i apigeelint -g

The error is

npm ERR! > npx mkdirp build && npx peggy -o build/ConditionParser.js lib/peggy/Apigee-Condition.pegjs
npm ERR! sh: mkdirp: command not found
ssvaidyanathan commented 7 months ago

update - I had to install peggy and mkdirp globally to install apigeelint globally

sudo npm install peggy mkdirp -g

and then sudo npm install apigeelint -g worked