justadudewhohacks / justadudewhohacks/opencv4nodejs

Docker instructions aren't compatible with Typescript

Open
#621 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

Since the typescript compiler ignores NODE_PATHS variable when resolving dependencies, when using this package with Typescript in a Docker container based on `justadudewhohacks/opencv-nodejs` it throws the following error: `error TS2307: Cannot find module 'opencv4nodejs'.`

The quick solution I've found to bypass this issue is to set my Docker project to run in /usr/lib using `WORKDIR /usr/lib`, but this seems like a hack.

Is there a better solution to this issue, and could you update the Usage with Docker instructions for Typescript projects?

Contributor guide

Open the contributing guide

Research direction

Start with the Usage section and the Docker setup based on justadudewhohacks/opencv-nodejs. Reproduce the TypeScript TS2307 module-resolution error, compare it with the WORKDIR /usr/lib workaround, and document a supported Docker setup for TypeScript projects if one can be established.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nodejs, typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.