-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pre-install node modules for Docker workflow #300
Conversation
…r so that VS Code can properly resolve deps and provide intellisense. Added TS alias to resolve modules without using relative paths. Add default empty .env.local'
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
---|---|---|---|
🟡 | Statements | 76.54% | 62/81 |
🟡 | Branches | 64.29% | 9/14 |
🟡 | Functions | 71.43% | 10/14 |
🟡 | Lines | 75% | 54/72 |
Test suite run success
7 tests passing in 3 suites.
Report generated by 🧪jest coverage report action from 000bfd5
… explicitly declare NODE_ENV as 'development' so that dev dependencies and path alias resolution works within the Docker container
I don't know if this is an issue for npm/node packages, but I've generally avoided doing this for package dependencies because packages sometimes aren't cross-platform compatible. Package managers typically do a good job of identifying which arch they need to be installing for. In this case, you're specifically installing packages that are good on debian, which may cause issues on Apple Silicon, etc |
@rocketnova Yea good point. I think if the intent is for dependency files to be present so IDEs can find the imports, this might be fine |
@sawyerh Do you think it's safe to assume that all developers working natively will be using IDEs? I don't 😅 but I also don't develop natively. |
@rocketnova What do you use? I may not be fully understanding |
@sawyerh Ah I see. I have misunderstood this issue. I apologize. I see that this PR is specifically for solving the local docker-based development workflow and making sure I think this PR approach is fine, but I would nit that we might want to rename the make target something more specific than |
Ticket
No ticket
Changes
make dev
.Context for reviewers
Missing dependencies on the host machine
When opting to use Docker to develop and run the application the dependencies are only installed inside the container when building the image. This will cause IDEs to trigger an error about missing dependencies (node_modules) since they are not installed on the host machine.
Testing
Alias
resolutionDocker
The
make dev
command has been modified to check for the node_modules directory and remove any existing containers to avoid a container naming collision.