# Node not shown in palette

**URL:** <https://discourse.nodered.org/t/node-not-shown-in-palette/21386>\
**Category:** General\
**Created:** [7 February 2020 09:13 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386 "2020-02-07T09:13:08Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 February 2020 08:09 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/22 "2020-02-23T08:09:31Z")

</div>

All the map loading for a start... Not sure why you need a map for cron. Must severely add bloat ?

---

<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:** [23 February 2020 09:33 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/23 "2020-02-23T09:33:46Z")

</div>

That's not in NPM yet Dave. And yeah, the map part is a CDN (for obvious reasons) but I'm not sure it could be called bloat (a button and dialog to ease geo coordinates setting) - more of an assist feature that works if you have internet. I do plan on having it show the user a message instead if no internet as fall back before publishing to NPM

@TotallyInformation, if you get a moment, I'd appreciate you pointing out what you spotted please. Ta.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 February 2020 09:44 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/24 "2020-02-23T09:44:59Z")

</div>

Ok - maybe not severely - but an extra few hundred kB just for the cartodb libraries and then plus any map tiles needed, just to set a timezone you could pick off a list without any connection to internet 🙂

---

<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:** [23 February 2020 11:08 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/25 "2020-02-23T11:08:36Z")

</div>

> [@dceejay](#):
>
> just to set a timezone you could pick off a list

That was my first thought but it's fairly substantial the difference in sun up & sun down time from the east most part of a time zone to the west most point. So for the sake a few hundred KB, I went for accuracy based on lon lat coods.

Perhaps there is a halfway house solution?

---

<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:** [23 February 2020 13:45 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/26 "2020-02-23T13:45:18Z")

</div>

Hi Steve, I found several `let` statements, I remember that.

Honestly, the best thing to do is to use eslint with a configuration than highlights anything ES6 related. You can add a simple setting that sets the ES version you want to target. If you want maximum browser support, I think that ES5 is the limit right now. I limit the html file to ES5 but allow ES6 in the .js file so that I can make best use of JS features from node.js v8.6+.

In regard to the mapping stuff. Any chance of that being optional? I'm fairly certain I won't ever use it - especially as I know the Lat/Long coordinates of my house anyway. I'd like to make cron+ the key timing function of my new setup but I'm concerned about having unnecessary code. I'm even more concerned about it being CDN based when I really don't need to use it except maybe once.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 February 2020 16:18 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/27 "2020-02-23T16:18:17Z")

</div>

well carto then pulls in leaflet and a load of other dependencies so the basic few hundred k is probably MBs. You could always use the built in browser geolocation api - at least the user would get a popup asking if they want to allow access to location and can say no 🙂

---

<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:** [23 February 2020 16:49 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/28 "2020-02-23T16:49:54Z")

</div>

Thanks for feedback. Afaik, `let` is fine in IE (apart from some scoping issues)

Hmmmmm. Will have to have a dig.

> [@dceejay](#):
>
> You could always use the built in browser geolocation api

I first looked at this but dismissed it for some reason.

Perhaps I could (instead of the Cartro lib) have the location button show a dialog where the user can request location from browser and offer advice on getting other location coords from external resources?

@TotallyInformation, @dceejay does that sound like a reasonable compromise?

---

<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:** [23 February 2020 22:23 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/29 "2020-02-23T22:23:11Z")

</div>

> [@Steve-Mcl](#):
>
> Thanks for feedback. Afaik, `let` is fine in IE (apart from some scoping issues)

> In Internet Explorer, `let` within a `for` loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the `let` immediately before the loop.

> **[let - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)**
>
> The let declaration declares re-assignable, block-scoped local variables, optionally initializing each to a value.

IE11 only. If anyone needs to support \<IE11 then it won't work.

---

<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:** [23 February 2020 22:53 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/30 "2020-02-23T22:53:18Z")

</div>

> [@TotallyInformation](#):
>
> \<IE11

Ha!

Sod that.

It's hard enough having to cater for the 2.2% still using that atrocity & IE10 is 💀 as of last month anyhoo.

---

<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:** [23 February 2020 23:29 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/31 "2020-02-23T23:29:58Z")

</div>

Well true, but as we now have quite a few commercial uses of Node-RED, we cannot rule out that some organisations may still have users stuck in the past.

---

<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:** [8 March 2020 23:29 UTC](https://discourse.nodered.org/t/node-not-shown-in-palette/21386/32 "2020-03-08T23:29:58Z")

</div>

Closed on 8 March 2020 23:29 UTC

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

[Previous page](https://discourse.nodered.org/t/node-not-shown-in-palette/21386.md?page=1)
