# Install contrib-opcua offline

**URL:** https://discourse.nodered.org/t/install-contrib-opcua-offline/64413
**Category:** General
**Created:** [27 June 2022 11:41 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413 "2022-06-27T11:41:16Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 11:41 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/1 "2022-06-27T11:41:16Z")

</div>

Hi,  
I am on a project getting data from a PLC over OPCUA to a SQL Server. Therefor i wanted to use NodeRed. The RemotePC where i can connect to the OPCUA does not have an active internet connection. I already finished the installation of NodeRed offline. But now I really have a Problem to get the modules working.  
I copied all the required node\_modules but i always get an Syntaxerror. Can anyone please help me.

 ![node-red](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb3d13f14960f21850fe4bde5da949db4be4d8f7.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: [27 June 2022 11:49 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/2 "2022-06-27T11:49:16Z")

</div>

Try downloading the tgz from npm then use the upload function in the palette manager.

Running `npm pack PACKAGE_NAME` on an internet connected device should download a tarball of the package.

---

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 11:55 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/3 "2022-06-27T11:55:59Z")

</div>

Can you please explain how to download the tgz from npm? Never done this before?

---

<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: [27 June 2022 11:58 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/4 "2022-06-27T11:58:38Z")

</div>

> [@madlen21](#):
>
> Can you please explain how to download the tgz from npm

As i said...

> [@Steve-Mcl](#):
>
> `npm pack PACKAGE_NAME` on an internet connected device

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a7f78ad6acb8ce9776498493c3b32ecd62838b2d.png)

---

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 12:10 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/5 "2022-06-27T12:10:17Z")

</div>

I got the .tgz for contrib opcua, copied it to the offline PC, but there i got an installation error. Do I miss something?

---

<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: [27 June 2022 12:11 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/6 "2022-06-27T12:11:50Z")

</div>

> [@madlen21](#):
>
> copied it to the offline PC, but there i got an installation error.

copied?

did you not use the upload tgz feature?

> [@Steve-Mcl](#):
>
> then use the upload function in the palette manager.

i.e...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/4/84a658721c3be120251e107fad613f29cf914fd0.png)

  

Also, did you remember to remove the other copied files you had added 👇

> [@madlen21](#):
>
> I copied all the required node\_modules but i always get an Syntaxerror

---

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 12:17 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/7 "2022-06-27T12:17:15Z")

</div>

Yes. On the online PC I created the tgz.file. The I copied it to the offline RemotePC. There I first removed the copied modules for the opcua. Then I started there NodeRed and did the upload of the tgz. It started to install, but gives me an Error, because of no Internet Connection.

The Error i posted on the picture above, i only get on the offline PC. On the online device the contrib-opcua modules are working.

---

<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: [27 June 2022 12:27 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/8 "2022-06-27T12:27:02Z")

</div>

It may be trying to get dependencies.

You could also grab the dependencies of the contrib opcua node & install those using the command line then try upload the tgz again (hint, the dependencies are listed in contrib opcua's `package.json` file under `dependencies`)

Alternatively, you could try packing WITH dependencies using something like [@tar-erpedia/deep-pack](https://www.npmjs.com/package/@tar-erpedia/deep-pack)

Otherwise, you could start again & using try the [alternate-node-red-installer](https://github.com/TotallyInformation/alternate-node-red-installer) by Julian - you would install everything you need then copy all of the that to the offline PC.

---

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 12:58 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/9 "2022-06-27T12:58:10Z")

</div>

The alternate installer is not really working for me. I tried the deep-pack, now i got a tgz-file for every dependency. How do i have to use them? Is there a special command to unpack them?

---

<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: [27 June 2022 13:03 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/10 "2022-06-27T13:03:53Z")

</div>

> [@madlen21](#):
>
> Is there a special command to unpack them

sure, but thats not what you would do.

Show me what you did and show me what got from running deep-pack

---

<div class="post-metadata">

### Author: ![madlen21](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@madlen21](https://discourse.nodered.org/u/madlen21)
#### Post date: [27 June 2022 13:07 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/11 "2022-06-27T13:07:36Z")

</div>

I followed the instruction you send me ([@tar-erpedia/deep-pack - npm](https://www.npmjs.com/package/@tar-erpedia/deep-pack)) So i installed npm i @tar-erpedia/deep-pack -g  
On the Online device I typed in the following command "npm-deep-pack node-red-contrib-opcua"  
The I got the following files, just every dependency as an tgz-file

 ![node-red](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/abf8f9a26e45afc9a4024211740c41e2275dfdb5.png)

---

<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: [26 August 2022 13:08 UTC](https://discourse.nodered.org/t/install-contrib-opcua-offline/64413/12 "2022-08-26T13:08:17Z")

</div>

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