diff --git a/src/main/java/de/adito/aditoweb/nbm/nodejs/impl/NPMInstallRequired.java b/src/main/java/de/adito/aditoweb/nbm/nodejs/impl/NPMInstallRequired.java index d6138e6..1e8039e 100644 --- a/src/main/java/de/adito/aditoweb/nbm/nodejs/impl/NPMInstallRequired.java +++ b/src/main/java/de/adito/aditoweb/nbm/nodejs/impl/NPMInstallRequired.java @@ -44,8 +44,10 @@ private boolean _isRequired() FileObject packageJsonFo = project.getProjectDirectory().getFileObject("package.json"); if (packageJsonFo == null) return false; - FileObject nodeModulesFo = project.getProjectDirectory().getFileObject("node_modules"); - long nodeModulesLastModified = nodeModulesFo == null ? 0 : FileUtil.toFile(nodeModulesFo).lastModified(); + FileObject packageLockFo = project.getProjectDirectory() + .getFileObject("node_modules", false) + .getFileObject(".package-lock.json"); + long nodeModulesLastModified = packageLockFo == null ? 0 : FileUtil.toFile(packageLockFo).lastModified(); return nodeModulesLastModified < FileUtil.toFile(packageJsonFo).lastModified(); }