forked from luckymarmot/API-Flow
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
To repeat:
npm install philsturgeon/API-flow --save-devconst ApiFlow = require('api-flow').default; // if from yarn/npm
const path = require('path');
const options = {
source: {
format: 'swagger',
version: 'v2.0'
},
target: {
format: 'raml',
version: 'v1.0'
}
}
const promise = ApiFlow.transform({
options,
uri: path.resolve(__dirname, './my_super_swagger.yml')
})
promise.then((data) => {
// do some cool stuff with the data
})Result:
Error: Cannot find module '/myproject/node_modules/api-flow/dist/node/api-flow.js'. Please verify that the package.json has a valid "main" entryWhy?
You don't add a build step in package.json, so dist/node/api-flow.js is never created.
Metadata
Metadata
Assignees
Labels
No labels