# Serial port install problem

**URL:** <https://discourse.nodered.org/t/serial-port-install-problem/24859>\
**Category:** General\
**Created:** [15 April 2020 09:03 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859 "2020-04-15T09:03:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arpit8851](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@arpit8851](https://discourse.nodered.org/u/arpit8851)\
**Post date:** [15 April 2020 09:03 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/1 "2020-04-15T09:03:21Z")

</div>

* * *

2020-04-15T08:59:58.980Z Install : node-red-node-serialport 0.10.1

2020-04-15T08:59:59.018Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-node-serialport@0.10.1  
2020-04-15T09:00:09.260Z [err] npm  
2020-04-15T09:00:09.260Z [err] ERR! Unexpected end of JSON input while parsing near '...TlDXbBxd3yyzp1XKWDzE+'  
2020-04-15T09:00:09.291Z [err]  
2020-04-15T09:00:09.291Z [err] npm ERR! A complete log of this run can be found in:  
2020-04-15T09:00:09.291Z [err] npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-04-15T09\_00\_09\_261Z-debug.log  
2020-04-15T09:00:09.307Z rc=1

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2020 09:20 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/2 "2020-04-15T09:20:01Z")

</div>

Could you run the install from the command line and post the result please. So go to your node-red folder (wherever that is on Windows, where your flows file is) and run  
`npm install node-red-node-serialport`

---

<div class="post-metadata">

**Author:** ![arpit8851](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@arpit8851](https://discourse.nodered.org/u/arpit8851)\
**Post date:** [15 April 2020 10:29 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/3 "2020-04-15T10:29:51Z")

</div>

npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\package.json'  
npm notice created a lockfile as package-lock.json. You should commit this file.  
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\package.json'  
npm WARN User No description  
npm WARN User No repository field.  
npm WARN User No README data  
npm WARN User No license field.  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 (node\_modules\bcrypt):  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@3.0.6 install: `node-pre-gyp install --fallback-to-build`  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2020 12:39 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/4 "2020-04-15T12:39:31Z")

</div>

> [@Colin](#):
>
> So go to your node-red folder

Do that and try again.  
If you don't know where that is then look at the node red startup log. It is where the flows file is.

---

<div class="post-metadata">

**Author:** ![arpit8851](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@arpit8851](https://discourse.nodered.org/u/arpit8851)\
**Post date:** [15 April 2020 17:32 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/5 "2020-04-15T17:32:53Z")

</div>

> [@Colin](#):
>
> npm install node-red-node-serialport

C:\Users\User.node-red\>npm install node-red-node-serialport  
npm ERR! Unexpected end of JSON input while parsing near '...TlDXbBxd3yyzp1XKWDzE+'

npm ERR! A complete log of this run can be found in:  
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-04-15T17\_32\_31\_971Z-debug.log

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2020 19:54 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/6 "2020-04-15T19:54:23Z")

</div>

That's interesting, that looks as if it might be another npm cache corruption, if so that is the second today and I can't remember if I have ever seen that before, certainly not for a long time. This fixed it for the other instance.

```auto
npm cache clean --force

```

---

<div class="post-metadata">

**Author:** ![arpit8851](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@arpit8851](https://discourse.nodered.org/u/arpit8851)\
**Post date:** [16 April 2020 07:52 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/7 "2020-04-16T07:52:59Z")

</div>

thnx for helping me

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 April 2020 08:40 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/8 "2020-04-16T08:40:27Z")

</div>

I wonder whether the npm repository had a hiccup and was serving out garbage for a while. Otherwise it is a remarkable coincidence that two users independently get garbage in the npm cache on the same day.

---

<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:** [30 April 2020 08:40 UTC](https://discourse.nodered.org/t/serial-port-install-problem/24859/9 "2020-04-30T08:40:28Z")

</div>

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