You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however when I try to setup something simple myself I seem to fall over at the first hurdle
Kong = require('kong-pdk');
Uncaught:
Error: Cannot find module '/Users/....../node_modules/kong-pdk/app.js'. Please verify that the package.json has a valid "main" entry
Hi @chrismatheson , you don't need to require("kong-pdk") either in the test or writing a plugin.
The kong instance is a fake object that exposes several type definitions, to allow you happy programming
with an IDE etc.
The entry point in package.json is indeed incorrect, we should remove it. PRs are welcomed!
from the docs
there are examples in the repo - https://github.com/Kong/kong-js-pdk/blob/master/__tests__/js-hello.test.js
however when I try to setup something simple myself I seem to fall over at the first hurdle
and I think this is actually a valid error because the current package.json shows
app.js
as the main entry point https://github.com/Kong/kong-js-pdk/blob/master/package.json#L5 and there are no app.js files in the repo.Before I make a pull request to try and clean things up a little I just wanted to check im not missing something basic.
The text was updated successfully, but these errors were encountered: