Closed GoncaloBastos closed 1 year ago
Thanks for filing, I never saw this error while developing with typescript in our various sample apps. I need to do some investigation to understand what's going wrong, but if typebox ends up being problematic we can refactor away from it.
Thanks for the response @jhamon. If it helps, here is the tsconfig json we use:
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./server-dist",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": false,
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"allowJs": true,
"importHelpers": true,
"target": "es2015",
"lib": ["es2018", "dom"],
"paths": {
"@/*": ["src/*", "../shared/*"]
}
},
"exclude": ["server-scripts", "pm2.config.js", "server-dist"]
}
And our project dependencies:
"dependencies": {
"@azure/arm-mediaservices": "^13.1.0",
"@azure/identity": "^3.3.0",
"@pinecone-database/pinecone": "^0.1.6",
"axios": "^1.5.0",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"mime-types": "^2.1.35",
"mssql": "^9.1.3",
"nodemon": "^3.0.1",
"path": "^0.12.7",
"stytch": "^8.2.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/express": "^4.17.17",
"@types/node": "^18.11.17",
"tslib": "^2.6.1",
"typescript": "^5.1.6"
}
@jhamon In my firebase code I am also having an issue: https://stackoverflow.com/questions/77066529/problem-with-pinecone-in-firebase-functions
tsjson:
{
"compilerOptions": {
"module": "commonjs",
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "lib",
"sourceMap": true,
"strict": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}
project dependencies:
"dependencies": {
"@pinecone-database/pinecone": "^1.0.0",
"firebase-admin": "^11.8.0",
"firebase-functions": "^4.3.1",
"openai": "^4.5.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.25.4",
"firebase-functions-test": "^3.1.0",
"typescript": "^4.9.0"
}
@jhamon Repro if needed: pinecone_bug.zip
npm install typescript
npm install @pinecone-database/pinecone
Thanks everyone for the details. Will follow-up soon with a fix.
I just published the 1.0.1
release with a lot of fixes for a variety of TypeScript issues. Release notes here. Please try it out and let me know if your install problems are resolved so I can close this issue.
Given the number of moving parts involved with Typescript it's still possible there are undetected issues. We'll have to continue expanding our compilation testing to cover these cases as they pop up.
@jhamon Compiles perfectly, big thanks.
I'm going to close this issue as I believe a wide variety of common issues were resolved in PR #114 that shipped in 1.0.1
. If you upgrade and still have compilation errors, please open a new ticket and I'll get to the bottom of it.
Perfect.
Is this a new bug?
Current Behavior
When running
npx tsc
several errors occur.Expected Behavior
Should transpile correctly.
Steps To Reproduce
Relevant log output
Environment
Additional Context
No response