node-red / node-red-dev-cli

Command-line tool for Node-RED Node authors
Apache License 2.0
7 stars 5 forks source link

There is warning "Warning: Duplicate nodename <nodename> found in package <node package>", when validate locally #19

Closed jatu-studiobox closed 2 years ago

jatu-studiobox commented 2 years ago

When run "node-red-dev validate" on local, There is an warning message below.

Warning: Duplicate nodename <nodename> found in package <node package>

Issue Reference :

https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/30 at question No.2

https://discourse.nodered.org/t/introducing-node-scorecards-and-a-new-node-naming-convention/57559/31 at Answer for question No.2

sammachin commented 2 years ago

Did you change the name of the package in package.json for you local version compared to what had already been published?

jatu-studiobox commented 2 years ago

Did you change the name of the package in package.json for you local version compared to what had already been published?

Yes, I added more "@scopemane" to my package, such as "@myscope/packagename", in package.json for my local version.

And yes, before validation, I had already published my project to npm. My project on npm has only 'packagename' in package.json.

knolleary commented 2 years ago

Then this is working as designed.

If you have renamed the package locally then the tool doesn't know you have previously published it under a different name. So it finds the module under its old name and warns of the duplicate.

jatu-studiobox commented 2 years ago

Ok. Thank you very much. 🙂

So follow your advise. I should not change my package, which had been published to npm.