bwgjoseph / mongoose-vs-ottoman

feature comparison between mongoose and ottoman
0 stars 1 forks source link

Module '"couchbase"' has no exported member #104

Open bwgjoseph opened 3 years ago

bwgjoseph commented 3 years ago

Hi,

I have an issue compiling one of my demo project. This demo project uses feathers-ottoman package

You can clone the project, and run npm run compile and the following errors will occur

image

There's no issue running the project via npm run dev or running the test npm run mocha though.

Is there some issue with the way those exceptions are being exported?

Thanks

gsi-alejandro commented 3 years ago

hi @bwgjoseph

try to set skipLibCheck to true in the tsconfig.json image

This issue should be solved once the couchbase 3.2 version had been released, 3.2 will be shipped with typescript support. Ottoman types will be improved after this release taking advantage of the SDK types.

gsi-alejandro commented 3 years ago

the couchbase 3.2 reimplemented the SDK in typescript: https://github.com/couchbase/couchnode/commit/59cbeddb9c5d43d09cff758c92ebd96627b806a2

bwgjoseph commented 3 years ago

Thanks, it does work with skipLibCheck

Is there any timeline for Couchbase 3.2 to be GA?

gsi-alejandro commented 3 years ago

@bwgjoseph The release date could be this July.

Am I correct @AV25242 ?

AV25242 commented 3 years ago

Hi @bwgjoseph 3.2 is currently slated for end of July.

bwgjoseph commented 3 years ago

Thanks. Will keep this issue open until verified resolved.

AV25242 commented 3 years ago

Assigning it back to you @bwgjoseph

bwgjoseph commented 3 years ago

This still doesn't work yet.

gsi-alejandro commented 2 years ago

hi @bwgjoseph

This should work fine, but I need to check it.

we recently updated to couchbase SDK 3.2.x that provide correct types and should allow removing the skipLibCheck flag

Later this will week I will notify you about this. (for now please keep using skipLibCheck or remove it if you want to check it by yourself)

bwgjoseph commented 2 years ago

Yup, I will test this a little later as well. Want to clear the existing issues first before testing this, probably few days later as well

bwgjoseph commented 2 years ago

Hi @gsi-alejandro,

I just ran a test by removing the skipLibCheck flag, and it still doesn't work but it seem much better now, only 2 errors

\feathers-ottoman-demo>npm run compile

> feathers-ottoman-demo@0.0.0 compile \feathers-ottoman-demo
> shx rm -rf lib/ && tsc

../feathers-ottoman/node_modules/couchbase/dist/logging.d.ts:1:19 - error TS7016: Could not find a declaration file for module 'debug'. 'Z:/Development/workspace/github/bwgjoseph/feathers-ottoman/node_modules/couchbase/node_modules/debug/src/index.js' implicitly has an 'any' type.       
  Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`

1 import debug from 'debug';
                    ~~~~~~~

../feathers-ottoman/node_modules/ottoman/lib/types/model/model.d.ts:8:22 - error TS2420: Class 'Model<T, R>' incorrectly implements interface 'IModel<T, R>'.
  Type 'Model<T, R>' is missing the following properties from type 'IModel<T, R>': find, count, findById, findOne, and 13 more.

8 export declare class Model<T = any, R = any> extends Document implements IModel<T, R> {
                       ~~~~~

Found 2 errors.