Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving a Typescript build error when trying docker-compose up #172

Open
theheffalump00 opened this issue Mar 5, 2024 · 2 comments
Open

Comments

@theheffalump00
Copy link

The Error:

When I install the core package and try docker-compose up, there seems to be a few build issues. Firstly some type of typescript error, possibly due to a package conflict which I did not anticipate as this github appears to be the official build. Is there some kind of recent pull thats caused a library conflict?

14.26 node_modules/@crawlee/http/internals/http-crawler.d.ts:372:44 - error TS1005: 'assert' expected.

I also see another error occuring with sentry: ```
14.26 src/common/sentry/sentry.interceptor.ts:30:13 - error TS2345: Argument of type 'TraceContext' is not assignable to parameter of type 'ExclusiveEventHintOrCaptureContext'.
14.26 Type 'TraceContext' is not assignable to type 'Scope & Partial<{ event_id?: nevFound 141 error(s).


 **Just to give an idea of the build:** 
 
` => [nodejs_worker internal] load build definition from Dockerfile                                                                                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 976B                                                                                                                                                                                                                                                                                    0.0s
 => [web internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                0.0s
 => => transferring dockerfile: 976B                                                                                                                                                                                                                                                                                    0.0s
 => [web internal] load metadata for docker.io/library/node:18-alpine                                                                                                                                                                                                                                                   2.1s
 => [python_worker internal] load build definition from Dockerfile                                                                                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 666B                                                                                                                                                                                                                                                                                    0.0s
 => [python_worker internal] load metadata for docker.io/library/python:3.8-slim-buster                                                                                                                                                                                                                                 2.1s
 => [python_worker auth] library/python:pull token for registry-1.docker.io                                                                                                                                                                                                                                             0.0s
 => [nodejs_worker auth] library/node:pull token for registry-1.docker.io                                                                                                                                                                                                                                               0.0s
 => [nodejs_worker internal] load .dockerignore                                                                                                                                                                                                                                                                         0.0s
 => => transferring context: 161B                                                                                                                                                                                                                                                                                       0.0s
 => [web internal] load .dockerignore                                                                                                                                                                                                                                                                                   0.0s
 => => transferring context: 161B                                                                                                                                                                                                                                                                                       0.0s
 => [python_worker internal] load .dockerignore                                                                                                                                                                                                                                                                         0.0s
 => => transferring context: 99B                                                                                                                                                                                                                                                                                        0.0s
 => CACHED [nodejs_worker production 1/4] FROM docker.io/library/node:18-alpine@sha256:ca9f6cb0466f9638e59e0c249d335a07c867cd50c429b5c7830dda1bed584649                                                                                                                                                                 0.0s
 => [web internal] load build context                                                                                                                                                                                                                                                                                   0.1s
 => => transferring context: 9.94kB                                                                                                                                                                                                                                                                                     0.1s
 => [python_worker 1/7] FROM docker.io/library/python:3.8-slim-buster@sha256:8799b0564103a9f36cfb8a8e1c562e11a9a6f2e3bb214e2adc23982b36a04511                                                                                                                                                                           0.0s
 => [python_worker internal] load build context                                                                                                                                                                                                                                                                         0.0s
 => => transferring context: 289B                                                                                                                                                                                                                                                                                       0.0s
 => [nodejs_worker internal] load build context                                                                                                                                                                                                                                                                         0.1s
 => => transferring context: 9.94kB                                                                                                                                                                                                                                                                                     0.0s
 => CACHED [python_worker 2/7] RUN apt-get update &&     apt-get install -y -q         openssl curl libpq-dev python3-dev build-essential &&     apt-get clean                                                                                                                                                          0.0s
 => CACHED [python_worker 3/7] COPY . /app                                                                                                                                                                                                                                                                              0.0s
 => CACHED [python_worker 4/7] COPY .env.docker /app/.env                                                                                                                                                                                                                                                               0.0s
 => CACHED [python_worker 5/7] WORKDIR /app                                                                                                                                                                                                                                                                             0.0s
 => CACHED [python_worker 6/7] RUN pip install --upgrade pip                                                                                                                                                                                                                                                            0.0s
 => CANCELED [python_worker 7/7] RUN pip install -r requirements.txt                                                                                                                                                                                                                                                   14.6s
 => CACHED [web build 2/7] WORKDIR /usr/src/app                                                                                                                                                                                                                                                                         0.0s
 => CACHED [web build 3/7] COPY --chown=node:node package*.json yarn.lock ./                                                                                                                                                                                                                                            0.0s
 => CACHED [web build 4/7] RUN yarn install                                                                                                                                                                                                                                                                             0.0s
 => CACHED [web build 5/7] COPY --chown=node:node . .                                                                                                                                                                                                                                                                   0.0s
 => ERROR [web build 6/7] RUN yarn run build                                                                                                                                                                                                                                                                           14.5s
------
 > [web build 6/7] RUN yarn run build:
0.814 yarn run v1.22.19
0.848 $ nest build
14.26 node_modules/@crawlee/http/internals/http-crawler.d.ts:372:44 - error TS1005: 'assert' expected.
14.26
14.26 372         request?: import("got-scraping", { with: { "resolution-mode": "import" } }).RequestFunction | undefined;
14.26                                                ~~~~
14.26
14.26   node_modules/@crawlee/http/internals/http-crawler.d.ts:372:42
14.26     372         request?: import("got-scraping", { with: { "resolution-mode": "import" } }).RequestFunction | undefined;
14.26                                                  ~
14.26     The parser expected to find a '}' to match the '{' token here.
14.26 node_modules/@crawlee/http/internals/http-crawler.d.ts:372:83 - error TS1144: '{' or ';' expected.
14.26
14.26 372         request?: import("got-scraping", { with: { "resolution-mode": "import" } }).RequestFunction | undefined;`


@sachinchoolur
Copy link
Collaborator

Hi @theheffalump00,

Yes, this happened after a recent merge conflict in yarn.lock file. This has been resolved now. Please try again and let me know if the issue persists

@theheffalump00
Copy link
Author

theheffalump00 commented Mar 10, 2024

Yes, this happened after a recent merge conflict in yarn.lock file. This has been resolved now. Please try again and let me know if the issue persists

Thanks for this @sachinchoolur . Will check it out but if you were aware of the problem then it should work. As for prod, are there any recommendations on deploying this app to the cloud? I saw the backend is separated into different workers - Is kubernetes recommend or is there something simpler? (For clarity I can't really run on my local machine as it doesnt have the requisite RAM For running this kind of app)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants