-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed as not planned
Labels
Description
Current Behavior
When usingyarn as package manager and trying to build a project that contains "generatePackageJson": true option, build target is failing
Expected Behavior
It should build
GitHub Repo
No response
Steps to Reproduce
- Include
generatePackageJsonin your target build project.json - run
yarn build <project>
Nx Report
Node : 20.9.0
OS : darwin-arm64
yarn : 1.22.19
nx (global) : 17.0.3
nx : 18.1.2
@nx/js : 18.1.2
@nx/jest : 18.1.2
@nx/linter : 18.0.8
@nx/eslint : 18.0.8
@nx/workspace : 18.1.2
@nx/cypress : 18.1.2
@nx/devkit : 18.1.2
@nx/eslint-plugin : 18.1.2
@nx/nest : 18.1.2
@nx/node : 18.1.2
@nx/plugin : 18.1.2
@nx/react : 18.1.2
@nx/rollup : 18.1.2
@nrwl/tao : 18.1.2
@nx/web : 18.1.2
@nx/webpack : 18.1.2
typescript : 5.3.3Failure Logs
TypeError: Cannot read properties of undefined (reading 'data')
at /Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/nx/src/plugins/js/package-json/create-package-json.js:124:55
at Array.forEach (<anonymous>)
at findProjectsNpmDependencies (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/nx/src/plugins/js/package-json/create-package-json.js:122:33)
at createPackageJson (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/nx/src/plugins/js/package-json/create-package-json.js:23:21)
at /Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/@nx/webpack/src/plugins/generate-package-json-plugin.js:30:64
at fn (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/webpack/lib/Compilation.js:478:10)
at Hook.eval [as callAsync] (eval at create (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/tapable/lib/Hook.js:18:14)
at cont (/Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/webpack/lib/Compilation.js:3059:34)
at /Users/oluwafem.iakinde/Documents/adtech-monorepo/node_modules/webpack/lib/Compilation.js:3107:10Package Manager Version
1.22.19
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
It's the same issue as this: #17450
Nick-Lucas