Fix Docker dev startup failure by replacing react-scripts with next dev #369
Open
khalidkhankakar wants to merge 1 commit intofossology:mainfrom
Open
Fix Docker dev startup failure by replacing react-scripts with next dev #369khalidkhankakar wants to merge 1 commit intofossology:mainfrom
khalidkhankakar wants to merge 1 commit intofossology:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a development environment issue where the fossologyui_server container fails to start due to a missing react-scripts dependency.
The Docker setup currently runs:
../node_modules/.bin/react-scripts startHowever, the project uses Next.js, and react-scripts is not part of the dependencies. This causes the container to fail with:
Error: Cannot find module '/usr/src/fossologyui/node_modules/.bin/react-scripts'To resolve this, the startup command has been updated to use the appropriate Next.js development server:
next devThis aligns the Docker development setup with the project's framework and allows the UI container to start successfully.
Changes
Updated the Docker development command:
Before:
../node_modules/.bin/react-scripts startAfter:
next devThis ensures the development server runs correctly for the Next.js-based UI.
How to test
Clone the repository
Run the development environment
docker-compose up --buildVerify that:
docker-compose -f docker-compose.dev.yml pull fossology_server && docker-compose -f docker-compose.dev.yml upstarts successfullyNext.js development server runs correctly
UI becomes accessible on:
http://localhost:3000Closes #368