reader
reader copied to clipboard
npm run build failed because shared files are not found
Error:
$ npm run build
> build
> tsc -p .
src/cloud-functions/crawler.ts:3:79 - error TS2307: Cannot find module '../shared' or its corresponding type declarations.
3 import { CloudHTTPv2, Ctx, Logger, OutputServerEventStream, RPCReflect } from '../shared';
~~~~~~~~~~~
src/db/crawled.ts:2:33 - error TS2307: Cannot find module '../shared/lib/firestore' or its corresponding type declarations.
2 import { FirestoreRecord } from '../shared/lib/firestore';
~~~~~~~~~~~~~~~~~~~~~~~~~
src/db/crawled.ts:9:21 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
9 static override collectionName = 'crawled';
~~~~~~~~~~~~~~
src/db/crawled.ts:11:14 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
11 override _id!: string;
~~~
src/db/crawled.ts:36:21 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
36 static override from(input: any) {
~~~~
src/db/crawled.ts:46:14 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
46 override degradeForFireStore() {
~~~~~~~~~~~~~~~~~~~
src/index.ts:6:50 - error TS2307: Cannot find module './shared' or its corresponding type declarations.
6 import { loadModulesDynamically, registry } from './shared';
~~~~~~~~~~
src/services/puppeteer.ts:4:24 - error TS2307: Cannot find module '../shared/services/logger' or its corresponding type declarations.
4 import { Logger } from '../shared/services/logger';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/services/puppeteer.ts:178:43 - error TS2339: Property 'fromFirestoreQuery' does not exist on type 'typeof Crawled'.
178 const cached = (await Crawled.fromFirestoreQuery(Crawled.COLLECTION.where('urlPathDigest', '==', digest).orderBy('createdAt', 'desc').limit(1)))?.[0];
~~~~~~~~~~~~~~~~~~
src/services/puppeteer.ts:178:70 - error TS2339: Property 'COLLECTION' does not exist on type 'typeof Crawled'.
178 const cached = (await Crawled.fromFirestoreQuery(Crawled.COLLECTION.where('urlPathDigest', '==', digest).orderBy('createdAt', 'desc').limit(1)))?.[0];
~~~~~~~~~~
src/services/puppeteer.ts:232:25 - error TS2339: Property 'save' does not exist on type 'typeof Crawled'.
232 Crawled.save(
~~~~
src/services/puppeteer.ts:240:26 - error TS7006: Parameter 'err' implicitly has an 'any' type.
240 ).catch((err) => {
~~~
Found 12 errors in 4 files.
Errors Files
1 src/cloud-functions/crawler.ts:3
5 src/db/crawled.ts:2
1 src/index.ts:6
5 src/services/puppeteer.ts:4
To reproduce go to backend/functions
and run npm run build
from an account which doesn't have access to the thinapps-shared/backend
.
It looks like the thinapps-shared backend does mostly logging monitoring and caching, but at this point, the project doesn't build without it.
I encountered same issue.
same issue, Please provide a reproducible installation method
I encountered same issue.
same issue
Same issue:
`src/cloud-functions/crawler.ts:3:79 - error TS2307: Cannot find module '../shared' or its corresponding type declarations.
3 import { CloudHTTPv2, Ctx, Logger, OutputServerEventStream, RPCReflect } from '../shared'; ~~~~~~~~~~~
src/db/crawled.ts:2:33 - error TS2307: Cannot find module '../shared/lib/firestore' or its corresponding type declarations.
2 import { FirestoreRecord } from '../shared/lib/firestore'; ~~~~~~~~~~~~~~~~~~~~~~~~~
src/db/crawled.ts:9:21 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
9 static override collectionName = 'crawled'; ~~~~~~~~~~~~~~
src/db/crawled.ts:11:14 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
11 override _id!: string; ~~~
src/db/crawled.ts:36:21 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
36 static override from(input: any) { ~~~~
src/db/crawled.ts:46:14 - error TS4112: This member cannot have an 'override' modifier because its containing class 'Crawled' does not extend another class.
46 override degradeForFireStore() { ~~~~~~~~~~~~~~~~~~~
src/index.ts:6:50 - error TS2307: Cannot find module './shared' or its corresponding type declarations.
6 import { loadModulesDynamically, registry } from './shared'; ~~~~~~~~~~
src/services/puppeteer.ts:4:24 - error TS2307: Cannot find module '../shared/services/logger' or its corresponding type declarations.
4 import { Logger } from '../shared/services/logger'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/services/puppeteer.ts:178:43 - error TS2339: Property 'fromFirestoreQuery' does not exist on type 'typeof Crawled'.
178 const cached = (await Crawled.fromFirestoreQuery(Crawled.COLLECTION.where('urlPathDigest', '==', digest).orderBy('createdAt', 'desc').limit(1)))?.[0]; ~~~~~~~~~~~~~~~~~~
src/services/puppeteer.ts:178:70 - error TS2339: Property 'COLLECTION' does not exist on type 'typeof Crawled'.
178 const cached = (await Crawled.fromFirestoreQuery(Crawled.COLLECTION.where('urlPathDigest', '==', digest).orderBy('createdAt', 'desc').limit(1)))?.[0]; ~~~~~~~~~~
src/services/puppeteer.ts:232:25 - error TS2339: Property 'save' does not exist on type 'typeof Crawled'.
232 Crawled.save( ~~~~
src/services/puppeteer.ts:240:26 - error TS7006: Parameter 'err' implicitly has an 'any' type.
240 ).catch((err) => { ~~~ `
same issue
same issue
Can this project be deployed completely locally and independently?
See https://github.com/jina-ai/reader/issues/14
Use the API for now.
这个项目的开源,就像笑话一样。做一个半成品放在这里。高效吗?整半天纯浪费时间。什么文档都没有。
Searching the codebase for from '../shared/services yields many files making this totally unusable locally or even deployable on my own!
Has anyone deployed successfully?
Has anyone deployed successfully?
The repo isn't deployable. Though I read the code and it looks like Mozilla's readability library is the main thing powering this API https://github.com/mozilla/readability
这个项目的开源,就像笑话一样。做一个半成品放在这里。高效吗?整半天纯浪费时间。什么文档都没有。
也就是说最重要的部分不开源。开源的跑不起来
Good news! Now you can self-host reader API. Spent a lot of time and removed all the thinapps-shared modules from my clone of reader API. https://github.com/hargup/reader
Happy coding :)
Good news! Now you can self-host reader API. Spent a lot of time and removed all the thinapps-shared modules from my clone of reader API. https://github.com/hargup/reader
Happy coding :)
My friend you are a real hero.