# Error in Upgrade d3v3.min.js into d3v7 version

**URL:** <https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056>\
**Category:** Core Development\
**Created:** [5 August 2022 08:25 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056 "2022-08-05T08:25:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnyaneshwar](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@dnyaneshwar](https://discourse.nodered.org/u/dnyaneshwar)\
**Post date:** [5 August 2022 08:25 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/1 "2022-08-05T08:25:52Z")

</div>

For node red deployment process I need latest version of d3 library in my node red project.  
currently I am using **d3v3.min.js** and node red working fine.but when I update or change file to **d3v7.min.js** node red show following error.  
Error in navigator.js file and red.js.

How I Update the d3 library version.

 ![Screenshot 2022-08-05 at 1.44.34 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/f/6fbab59bb6eefda607df977f4dbf77f4a046e28b.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 August 2022 08:34 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/2 "2022-08-05T08:34:19Z")

</div>

`d3` has changed massively (and incompatibly) over its major versions. so unless you also re-write all the Node-RED editor code, updating `d3` is not going to work.

why do you actually _NEED_ `d3` v7?

---

<div class="post-metadata">

**Author:** ![dnyaneshwar](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@dnyaneshwar](https://discourse.nodered.org/u/dnyaneshwar)\
**Post date:** [5 August 2022 09:11 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/3 "2022-08-05T09:11:07Z")

</div>

I have install Node red from git repo, and in that node red use this d3v3 library internaly.I have not use for my custom code.then how i rewrite node red internal editor code

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 August 2022 10:02 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/4 "2022-08-05T10:02:21Z")

</div>

it is still unclear why you want d3 v7 - can you clarify what you are attempting to do? There may be a different solution or direction.

---

<div class="post-metadata">

**Author:** ![dnyaneshwar](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@dnyaneshwar](https://discourse.nodered.org/u/dnyaneshwar)\
**Post date:** [5 August 2022 10:14 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/5 "2022-08-05T10:14:41Z")

</div>

For ISG Scanning our node red Project Before production deployment.They not allowed deprecated or oldest version of library to deploy on production env.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [5 August 2022 10:21 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/6 "2022-08-05T10:21:40Z")

</div>

In which case, unless you re-write quite a lot of node-red, you will never have approval.

AFAIK d3 v3 is not a major security risk and a policy such as this "ISG Scanning" means you either have to re-write a lot of node-red code or you dont use node-red (which would be most unfortunate due to the amazing integration possibilities it provides).

I suspect also you will need to change the whole Node-RED project to ESM as well since the "GOT" library is currently pegged at V11.x but there is a newer v12.x release of GOT (that they changed to ESM only)

PS, if you DO implement all these changes, a contribution back to node-red via discussions and eventually PRs would be welcome. Everyone wins 🙂

NOTE: I will move the thread to the #development section of the forum where I believe it belongs.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 August 2022 12:21 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/7 "2022-08-05T12:21:04Z")

</div>

Just a note to say that this problem is going to occur more and more as Node-RED gets adopted into enterprise environments.

For example, the NHS has a similar rule for production code as will many regulated industries.

This is a hard problem for any complex Node.js (or Python, C++, etc) application to manage. But it is essential for the protection of enterprise environments.

In the NHS, failure to do this can result in quite serious fallout that is managed at a national scale. It can result in cyber security accreditation being lost for example which is a requirement for all NHS organisations and their vendors.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 October 2022 12:21 UTC](https://discourse.nodered.org/t/error-in-upgrade-d3v3-min-js-into-d3v7-version/66056/8 "2022-10-04T12:21:36Z")

</div>

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