Skip to content

Fixed npm vulnerabilities while initializing the app with Spiderly.CLI #3#189

Open
sthenua1308 wants to merge 1 commit intofiliptrivan:mainfrom
sthenua1308:fix/npm-audit
Open

Fixed npm vulnerabilities while initializing the app with Spiderly.CLI #3#189
sthenua1308 wants to merge 1 commit intofiliptrivan:mainfrom
sthenua1308:fix/npm-audit

Conversation

@sthenua1308
Copy link
Copy Markdown

Issue CLI #3

The project had multiple npm vulnerabilities and deprecated dependencies.
While working with the Angular project, running ng serve failed with:
"Cannot determine project or target for command."

This happened because the Angular workspace contains a library, not an application.


Steps to Reproduce

  1. Navigate to the Angular project
  2. Run:
    npm install
  3. Try to start the project:
    npm start
  4. Error occurs because the project is a library

What I Did

  • Installed dependencies using:
    npm install
  • Checked outdated packages:
    npm outdated
  • Upgraded dependencies:
    npx npm-check-updates -u
  • Reinstalled updated packages:
    npm install
  • Reviewed angular.json configuration
  • Identified that the project type is library
  • Used correct command to verify build:
    npx ng build spiderly

Solution

  • Instead of running ng serve, used:
    npx ng build spiderly
  • Ensured the project builds successfully
  • Updated dependencies to latest compatible versions

Result

  • Angular library builds successfully without errors
  • Dependency versions updated
  • Reduced vulnerabilities
  • Clarified correct usage of the project

Notes

  • Remaining vulnerabilities are related to upstream dependencies
  • Fixing them may require a major Angular upgrade in a separate PR

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.

1 participant