Skip to content

npmInstall up-to-date check broken with fastNpmInstall #310

Open
@SebastianS90

Description

@SebastianS90

I stumbled on a weird issue with the following steps:

  1. Fresh git checkout, i.e. no node_modules directory present
  2. Run task npmInstall with the fastNpmInstall option enabled
  3. Run the clean task, i.e. remove the whole node_modules directory
  4. Run npmInstall again, it reports as up-to-date
  5. Other tasks fail because node_modules is missing

The problem is that in step 2 the file node_modules/.package-lock.json was not recorded as output because it did not yet exist at configuration time, only after task execution. So the task has no configured outputs and won't become out of date by removing the node_modules directory.

Proposed fix: When using fastNpmInstall, do not check for existance of the file at configuration time here, instead always return the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions