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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment_scripts/deploy_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.

& npm run dist
Pop-Location

Expand Down
1 change: 1 addition & 0 deletions monkey/monkey_island/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
1. Build Monkey Island frontend
- cd to 'monkey_island\cc\ui'
- run 'npm update'
- run 'npm ci'
- run 'npm run dist'

#### How to run
Expand Down