-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Describe the bug
Spot outputs TS errors when spot generate command is run in an monorepo. But the same code works fine when it is outside a monorepo. This may be an issue with TS looking at parent node_modules folder
To Reproduce
- Create a package.json with serverless in root folder:
{
"dependencies": {
"serverless": "^3.15.0"
}
}- Create another package.json in a nested folder: (root/spot)
{
"dependencies": {
"@airtasker/spot": "^1.9.0"
}
}- Add api.ts file
- Run
spot generate --contract api.ts --language yaml --generator openapi3 --out output/ - Exists with errors shared below
Expected behavior
spot generate works in a monorepo setup
Screenshots
Example command line output:
...
';' expected.
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
';' expected.
Cannot find name 'infer'.
';' expected.
Cannot find name 'T'.
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
';' expected.
Cannot find name 'infer'.
';' expected.
Cannot find name 'U'.
';' expected.
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
';' expected.
Cannot find name 'T'.
Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
';' expected.
'PascalCase' only refers to a type, but is being used as a value here.
Cannot find name 'U'.
'(' expected.
';' expected.
'PropertyKey' only refers to a type, but is being used as a value here.
';' expected.
';' expected.
';' expected.
This expression is not callable.
Unterminated template literal.
Desktop (please complete the following information):
- NPM version: 6.14.16
- Node version: v14.19.1
- Spot version: 1.9.0
Metadata
Metadata
Assignees
Labels
No labels