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

Errors during Docker build #17

Closed
teq-dev opened this issue Apr 6, 2022 · 1 comment · Fixed by #18
Closed

Errors during Docker build #17

teq-dev opened this issue Apr 6, 2022 · 1 comment · Fixed by #18

Comments

@teq-dev
Copy link

teq-dev commented Apr 6, 2022

I encountered the following declaration error during the Docker build process. This happened in two places: bot-engine:build and builder:build. The error was only fatal during the builder:build step.

builder:build: info  - Checking validity of types...
builder:build: Failed to compile.
builder:build:
builder:build: ./components/auth/SocialLoginButtons.tsx:6:27
builder:build: Type error: Could not find a declaration file for module 'qs'. '/app/node_modules/qs/lib/index.js' implicitly has an 'any' type.
builder:build:   Try `npm i --save-dev @types/qs` if it exists or add a new declaration (.d.ts) file containing `declare module 'qs';`
builder:build:
builder:build:   4 | import { useRouter } from 'next/router'
builder:build:   5 | import React from 'react'
builder:build: > 6 | import { stringify } from 'qs'
builder:build:     |                           ^
builder:build:   7 | import { FacebookLogo, GoogleLogo } from 'assets/logos'
builder:build:   8 |
builder:build:   9 | export const SocialLoginButtons = () => {
builder:build: error Command failed with exit code 1.
builder:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
builder:build: Error: command finished with error: command (apps/builder) yarn run build exited (1)
command (apps/builder) yarn run build exited (1)
bot-engine:build: cache miss, executing 2e4d68d48ed032ad
bot-engine:build: $ yarn rollup -c
bot-engine:build: $ /app/node_modules/.bin/rollup -c
bot-engine:build:
bot-engine:build: src/index.ts → dist/cjs/index.js, dist/esm/index.js...
bot-engine:build: (!) Plugin typescript: @rollup/plugin-typescript TS7016: Could not find a declaration file for module 'qs'. '/app/node_modules/qs/lib/index.js' implicitly has an 'any' type.
bot-engine:build:   Try `npm i --save-dev @types/qs` if it exists or add a new declaration (.d.ts) file containing `declare module 'qs';`
bot-engine:build: src/services/integration.ts: (20:27)
bot-engine:build:
bot-engine:build: 20 import { stringify } from 'qs'
bot-engine:build:                              ~~~~
bot-engine:build:

To allow the build process to finish, I added the following to apps/builder/tsconfig.json:

teq-dev@050f8c7

I also encountered the following Type error during the builder:build process:

builder:build: info  - Checking validity of types...
builder:build: Failed to compile.
builder:build:
builder:build: ./services/graph.ts:75:17
builder:build: Type error: Argument of type 'string' is not assignable to parameter of type 'never'.
builder:build:
builder:build:   73 |       ? sourcePosition.x + (targetPosition.x - sourcePosition.x) / 2
builder:build:   74 |       : sourcePosition.x - (sourcePosition.x - targetPosition.x) / 2
builder:build: > 75 |   segments.push(`L${firstSegmentX},${sourcePosition.y}`)
builder:build:      |                 ^
builder:build:   76 |   segments.push(`L${firstSegmentX},${targetPosition.y}`)
builder:build:   77 |   segments.push(`L${targetPosition.x},${targetPosition.y}`)
builder:build:   78 |   return segments.join(' ')
builder:build: error Command failed with exit code 1.
builder:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
builder:build: Error: command finished with error: command (apps/builder) yarn run build exited (1)
command (apps/builder) yarn run build exited (1)

To allow the build process to finish, I updated apps/builder/services/graph.ts as follows:

teq-dev@03ebdd5

After these changes, the Docker build was successful!

@baptisteArno
Copy link
Owner

Thank you @teq-dev 🙏

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

Successfully merging a pull request may close this issue.

2 participants