Closed
Description
Current Behavior
Trying to run build-storybook
in a monorepo fails if the package-lock.json
file is excluded in .gitignore
.
It stops with the following error:
Daemon process terminated and closed the connection
Expected Behavior
build-storybook
should run successfully without depending on .gitignore
exclusions.
GitHub Repo
https://github.com/eyalellenbogen/nx-storybook-issue
Steps to Reproduce
- clone the example repo
- run
npm install
andnx build-storybook sb
To fix:
- Remove the
package-lock.json
line from.gitignore
- run
nx build-storybook sb
again
Nx Report
Node : 20.19.0
OS : win32-x64
Native Target : x86_64-windows
npm : 10.8.2
nx : 20.7.1
@nx/js : 20.7.1
@nx/eslint : 20.7.1
@nx/workspace : 20.7.1
@nx/angular : 20.7.1
@nx/cypress : 20.7.1
@nx/devkit : 20.7.1
@nx/eslint-plugin : 20.7.1
@nx/module-federation : 20.7.1
@nx/rspack : 20.7.1
@nx/storybook : 20.7.1
@nx/web : 20.7.1
@nx/webpack : 20.7.1
typescript : 5.7.3
---------------------------------------
Registered Plugins:
@nx/storybook/plugin
---------------------------------------
Community plugins:
@storybook/angular : 8.6.12
angular-eslint : 19.3.0
---------------------------------------
Cache Usage: 0.00 B / 95.23 GB
Failure Logs
Error: The externalDependency 'storybook' for 'my-storybook:build-storybook' could not be found
at NativeTaskHasherImpl.hashTasks (....project\node_modules\nx\src\hasher\native-task-hasher-impl.js:32:36)
at InProcessTaskHasher.hashTasks (....project\node_modules\nx\src\hasher\task-hasher.js:62:50)
at handleHashTasks (....project\node_modules\nx\src\daemon\server\handle-hash-tasks.js:30:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handleResult (....project\node_modules\nx\src\daemon\server\server.js:170:16)
at async handleMessage (....project\node_modules\nx\src\daemon\server\server.js:111:9)
at async ....project\node_modules\nx\src\daemon\server\server.js:73:9 {
code: 'GenericFailure'
}
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
This happens on v19 and v20.