Just noticed this reported from npm? Any idea when NR will jump to pkg.json? If ever?

Just noticed this reported from npm? Any idea when NR will jump to pkg.json? If ever?

npm WARN deprecated package.json@2.0.1: Use pkg.json instead.

Any more context? Like where that is coming from? The core? A node? Your nodejs/npm versions etc

If you run npm list package.json from your .node-red folder, what do you see?

Node-RED has no direct dependency on the deprecated package.json module that is generating that message.

It is either coming from a deeper dependency (although I've never seen that message, so I don't believe that is the case) or it's coming from another module you have installed.

The npm list command suggested by @Steve-Mcl will help identify what is bringing that module in.

Sure... Have been updating my image library to bullseye based images, and this warning popped up on a fresh install of NR on Pi OS 11 lite. I have a script that installs a standard set of modules I need for the minimum core flows I run on sensor oriented Pi devices. The version of the script pushes everything to 'latest' since this is test build image. So if some of the versions of modules seems aggressive, it is.

$ npm list
node-red-project@0.0.1 /home/pi/.node-red
├── i2c-bus@5.2.2
├── javascript-color-gradient@2.3.4
├── n@8.0.2
├── node-red-contrib-bme280@1.0.0
├── node-red-contrib-counter@0.1.6
├── node-red-contrib-cron-plus@1.5.6
├── node-red-contrib-fs-ops@1.6.0
├── node-red-contrib-linux-network-stats@0.2.5
├── node-red-contrib-loop-processing@0.5.1
├── node-red-contrib-md5@1.0.4
├── node-red-contrib-os@0.2.1
├── node-red-contrib-play-audio@2.5.0
├── node-red-contrib-ring-buffer@0.10.0
├── node-red-contrib-simple-gate@0.5.2
├── node-red-contrib-traffic@0.2.1
├── node-red-contrib-ui-led@0.4.11
├── node-red-dashboard@3.1.6
├── node-red-node-mysql@1.0.1
├── node-red-node-pi-gpio@2.0.1
├── node-red-node-pi-gpiod@0.4.0
├── node-red-node-ping@0.3.1
├── node-red-node-random@0.4.0
├── node-red-node-serialport@0.15.0
├── node-red-node-smooth@0.1.2
├── node-red-node-ui-list@0.3.6
├── node-red-node-ui-table@0.3.12
├── npm@8.5.1
├── os@0.1.2
├── package.json@2.0.1
└── Package@0.0.1

$ node -v

That isn't the command Steve asked you to run.

Please run npm list package.json

Just to add, all of this is under your .node-red directory - so this is all the extra stuff you have installed. It is not a dependency of the core of Node-RED. So your question about Node-RED needing to update is certainly misplaced.

Misplaced or just informational? Was curious if that was a 'standard' going forward. If you read my question CAREFULLY, I did ask if the new file name was EVER applicable. NR is based on Node.js so as Node.js changes standards, etc., may pull NR forward as needed, so that is why I asked what I asked.... what I am surprised by, is your response, this asked in good faith... NOT demand or inquisition.

We are still interested where it is coming from (just in case)

Can you please run the command I asked & show us the output.

I can see your confusion. The message about package.json being depreciated is not to do will the file name but an actual npm package called package.json that has been depreciated.

It isn't a standard, it is a possibly clumsily named npm package.

npm's package.json file isn't changing as far as I know or can see.

Right... distracted for a second...

$ npm list package.json
node-red-project@0.0.1 /home/pi/.node-red
└── package.json@2.0.1

Yeah, I could not see any logical reason for the warning, seemed really odd. In that I don't recall seeing it the past... maybe I just missed seeing, since much of what I do is via automation.

I apologise that my response didn't come across well.

From what I can see, I think you may have mistakenly run npm install package.json as that is the only way that module would have got added as a dependency in your own package.json file.

You should be able to safely remove that module as nothing is actually using it.

Ah. given all the automation script, and updates being done in the lab test builds... that could have happened. I will have to check the logs. Should only be running 'npm install' or 'npm rebuild' as applicable of course.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.