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

Island: Add npm ci to deplyoment script for windows #1281

Closed
wants to merge 1 commit into from

Conversation

ilija-lazoroski
Copy link
Contributor

@ilija-lazoroski ilija-lazoroski commented Jun 29, 2021

What does this PR do?

Fixes npm issue in deployment script fro windows.

Add any further explanations here.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by {Running the Monkey locally with relevant config/running Island/...}

  • If applicable, add screenshots or log transcripts of the feature working

Explain Changes

Are the commit messages enough? If not, elaborate.

@codecov
Copy link

codecov bot commented Jun 29, 2021

Codecov Report

Merging #1281 (2e75f70) into develop (60c1212) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1281   +/-   ##
========================================
  Coverage    30.11%   30.11%           
========================================
  Files          445      445           
  Lines        13347    13347           
========================================
  Hits          4020     4020           
  Misses        9327     9327           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60c1212...2e75f70. Read the comment docs.

@@ -242,6 +242,7 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName,
"Updating npm"
Push-Location -Path (Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\cc\ui")
& npm update
& npm ci
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VakarisZ I'm not very familiar with npm. Should we be using npm install instead since this is a development environment? Do we need do npm update if we do npm ci?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm ci is similar with npm install https://docs.npmjs.com/cli/v6/commands/npm-ci . And npm install didn't help solving the issue with the dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I encountered the same problem on Ubuntu 16.04
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay so It appears that the package-lock.json and package.json after deployment are changing which is causing the problem above.

The steps were:

  1. Run deploy_linux.sh
  2. Try to run the monkey_island and see that the frontend is not build
  3. Check git status to see that package.json and package-lock.json are changed.

It is resolved by:
Checkout the changes and run npm ci and npm run dist to build the frontend.

@ilija-lazoroski
Copy link
Contributor Author

npm install sass-loader node-sass webpack --save-dev is a command from the deployment scripts which changes package-lock.json and package.json from the ui . Regarding to that npm ci will not help.

The solution is to checkout the files mention above and run npm install then npm run dist to build the UI.

@ilija-lazoroski ilija-lazoroski deleted the npm-ci-deploy-windows branch July 5, 2021 13:01
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 this pull request may close these issues.

2 participants