Expected Behavior
Projects with local dependencies should have successful builds every time.
Current Behavior
When using a local stylesheet dependency within the project, the first build succeeds, but subsequent builds fail. This seems to be because in subsequent builds, the cached /layers/paketo-buildpacks_npm-install/build-modules layer is reused and somehow the local dependency is then unable to be found.
Project structure:
- MyAngularProject
- dependencies
- package.json
- package-lock.json
- src
package.json:
{
...
"dependencies": {
...
"@somedependency/prebuilt-themes": "file:./dependencies/@somedependency/prebuilt-themes",
"@somedependency/shell": "file:./dependencies/@somedependency/shell",
...
}
}
First build is successful, no layer is cached, and all dependencies are installed screenshot:


Subsequent builds fail. Subsequent builds use the cached npm-install layer and fail during the Node Run Script buildpack layer, screenshot:

The specific error is as follows:
Error: Module build failed (from ../layers/paketo-buildpacks_npm-install/build-modules/node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ../layers/paketo-buildpacks_npm-install/build-modules/node_modules/sass-loader/dist/cjs.js): SassError: Can't find stylesheet to import.
Possible Solution
Steps to Reproduce
Using kpack.
Paketo NPM Install 1.4.10
Paketo Node Run Script 1.0.27
Motivations
This prevents our deployments from succeeding. We have to delete our kpack image object and recreate it every time so the npm-install layer won't be cached and the build will succeed.
Expected Behavior
Projects with local dependencies should have successful builds every time.
Current Behavior
When using a local stylesheet dependency within the project, the first build succeeds, but subsequent builds fail. This seems to be because in subsequent builds, the cached
/layers/paketo-buildpacks_npm-install/build-moduleslayer is reused and somehow the local dependency is then unable to be found.Project structure:
package.json:First build is successful, no layer is cached, and all dependencies are installed screenshot:
Subsequent builds fail. Subsequent builds use the cached
npm-installlayer and fail during theNode Run Script buildpack layer, screenshot:The specific error is as follows:
Error: Module build failed (from ../layers/paketo-buildpacks_npm-install/build-modules/node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ../layers/paketo-buildpacks_npm-install/build-modules/node_modules/sass-loader/dist/cjs.js): SassError: Can't find stylesheet to import.Possible Solution
Steps to Reproduce
Using
kpack.Paketo NPM Install 1.4.10Paketo Node Run Script 1.0.27Motivations
This prevents our deployments from succeeding. We have to delete our
kpackimageobject and recreate it every time so thenpm-installlayer won't be cached and the build will succeed.