Closed jericopingul closed 1 year ago
I've got the same error myself when looking to add a new lib with a package.json for publishing the lib
yarn nx report
> NX Report complete - copy this into the issue template
Node : 16.16.0
OS : win32 x64
yarn : 3.3.0
nx : 15.0.13
@nrwl/angular : 15.0.13
@nrwl/cypress : 15.0.13
@nrwl/detox : Not Found
@nrwl/devkit : 15.0.13
@nrwl/esbuild : Not Found
@nrwl/eslint-plugin-nx : 15.0.13
@nrwl/expo : Not Found
@nrwl/express : Not Found
@nrwl/jest : 15.0.13
@nrwl/js : 15.0.13
@nrwl/linter : 15.0.13
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 15.0.13
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : 15.0.13
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/rollup : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 15.0.13
@nrwl/web : Not Found
@nrwl/webpack : 15.0.13
@nrwl/workspace : 15.0.13
typescript : 4.8.4
---------------------------------------
Local workspace plugins:
---------------------------------------
Community plugins:
ng-zorro-antd: 14.2.1
ngx-daterangepicker-material: 6.0.0
@compodoc/compodoc: 1.1.19
@jscutlery/semver: 2.27.1
ngx-deploy-npm: 4.3.0
nx-stylelint: 14.0.2
I have a similar issue to @DoomAndLove. If I log inside npm-packages.js and inspect what's failing I get this:
['devDepencies', 'html-webpack-plugin']
(this was added via cypress' component-test generator)npmPackages.[x].name === 'npm:html-webpack-plugin-4@npm:html-webpack-plugin'
npmPackages.[x].data.packageName === 'html-webpack-plugin-4@npm:html-webpack-plugin'
// I also get an entry for 'html-webpack-plugin-5' which has the same issue
for all other packages, [x].data.packageName is simply the regular npm module name.
EDIT: after debugging I've got more info.
This is what yarn.lock
looks like
"html-tags@npm:^3.2.0":
version: 3.2.0
resolution: "html-tags@npm:3.2.0"
checksum: <redacted>
languageName: node
linkType: hard
"html-webpack-plugin-4@npm:html-webpack-plugin@^4":
version: 4.5.2
resolution: "html-webpack-plugin@npm:4.5.2"
dependencies:
"@types/html-minifier-terser": ^5.0.0
"@types/tapable": ^1.0.5
"@types/webpack": ^4.41.8
html-minifier-terser: ^5.0.1
loader-utils: ^1.2.3
lodash: ^4.17.20
pretty-error: ^2.1.1
tapable: ^1.1.3
util.promisify: 1.0.0
peerDependencies:
webpack: ^4.0.0 || ^5.0.0
checksum: <redacted>
languageName: node
linkType: hard
so the package-mapper fails because it's not expecting that trailing @^4
I think the fix for this issue will work regardless, but @FrozenPandaz should I make a ticket for this specific problem? Or maybe someone knows why this particular dependency is being weird?
Thank you both @meeroslav and @FrozenPandaz for helping resolve this 🎉
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Running into an error when running
nx affected
because the resultingundefined
returned by an[].find()
isn't handled.Expected Behavior
No error, undefined is handled.
Github Repo
https://github.com/jericopingul/nx-affected-issue
Steps to Reproduce
git checkout test
pnpm i
and thenpnpm nx affected --target=lint
Nx Report
Failure Logs
Additional Information
No response