Code Monkey home page Code Monkey logo

electron-node-red's Introduction

Electron Node-RED

platform GitHub version GitHub license

This is an Electron template to embed Node-RED with an existing Node-RED project to create a native application.

This is not intended to be a useful tool as-is, but as a base for you to create your own versions. You will need to edit the main.js to suit your application and update the package.json file to include your own required nodes and dependencies.

There are several simple switches that can be set in the NRelectron section of the package.json file. More significant modifications will require modification of the main.js file. Have fun.

Wrapping an existing Node-RED project

The merger.js utility should be run from within this projects directory and can be pointed at an existing Node-RED project directory. It will try to copy over and package up the relevant files into this project ready to install and build - so the simple flow would be

./merger.js {path to my Node-RED project directory}
yarn
yarn start

This uses the package-template.json file as the main electron setup - so you should edit any build parameters, product name, whether you want the app version to be editable, run in kiosk mode, etc in the NRelectron section before running.

The app name, version and description are picked up from the package.json file of the original project.

When running using yarn start - the flow file is picked from the current directory. When running as an app (but only if editable), then the flow file is copied into the users .node-red directory and is read and written from there. The default name can be changed in the package.json file if required.

NOTE: Currently the settings are set around line 110 of the main.js file. If you do use any custom settings then currently you will need to modify this manually.

Configuring the project for building

This project uses the electron-builder project to help build native versions of Node-RED applications, so please read and become familiar with their documentation as some basic knowledge is assumed.

As a pre-req, as well as a recent version of node.js, you will need the yarn install tool.

# Clone this repository
git clone https://github.com/dceejay/electron-node-red.git
# Go into the repository
cd electron-node-red
# Install the yarn install tool globally
sudo npm i -g yarn
# Install project dependencies
yarn

Building local runtime

You should then be able to run

yarn && yarn dist

to create a runtime for your local platform. However - there may be some errors. If so they are usually fairly self explanatory, and may just require installation of another npm or brew or apt package, then retry the command.

Runtimes are created in the dist directory under the electron-node-red project.

Building for other platforms

Generally you can just add the required parameter to the command

yarn && yarn dist -w        // for windows (but use multi-platform builder below for building on Mac Catalina)
yarn && yarn dist -l        // for linux
yarn && yarn dist -m        // for mac

These will generally fail the first time through, and you will need to install some extra library in order to make it complete successfully.

The defaults are to build a .msi for Windows, a .dmg for Mac, and both a .deb and .rpm for Linux. These can be changed by editing the build section of the package.json file, see the electron-builder config docs for more information.

Building multi platform using Docker

Electron-builder has a pre-configured Docker image that can help you build cross platform images if you like Docker - again read their docs.

This is very useful if you need to build for Windows on a Mac as the electron-builder invokes wine which is only 32-bit and so can't be run under Catalina.

Developing and Testing - Running locally

While developing and testing you can just run your app locally by running

yarn start

from within the project folder.

The initial flow file is named electronflow.json along with it's credentials file electronflow_cred.json. Just copy your existing flow in instead.

The default is to start on the dashboard page - as this is intended to be just an application - without the Node-RED editor exposed to the end user, but there are some simple flags to to configure this within the package.json or at the top of main.js.


electron-node-red's People

Contributors

alv67 avatar dceejay avatar natcl avatar paulhayes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-node-red's Issues

Feature request: Save .node-red on current folder and others suggesting

Hi
For currently if we use compiled electron-node-red package, then it will save installed node to $home$/.node-red. But i think save to local folder is good idea, cus we can easyly re-package and hand out it.
add the settings follow this, node-red will install nodes to current folder:

//save all nodes for local folder
settings.userDir = './.node-red/';
settings.nodesDir = './.node-red/node_modules';

But it take a little problem, when you install a new node library in node-red, it will fail. just close program and open, it will success load.
And please zip the ./dist/win-unpacked folder for windows, if we use electron then we want a full portable program just unzip-run.

Another problem is single instance lock. add the follow line:

//Only allow one instance
let isSingleInstance = app.requestSingleInstanceLock()
if (!isSingleInstance) {
	app.quit()
}

Also it take a little problem, the second instance will quit but not focus on last one instance.. idk how to fix it.

The last one is modify autoHideMenuBar : true in function createWindow() , for end user they dont want to see menubar at starting, just see node-red ui is enough.
I'm work for industrial automation, use electron-node-red to communication plcs and create a easy-to-use HMI. You repositories is great for us. But maybe my suggest is wrong, please point me.

Thanks you

Hide flow files

When running the exe the flow file is saved in C:/Users/USERNAME/.node-red but I want to distribute my package for commercial use so I don't want users to see the flows and how the app was built on node-red.

Is there any way to package the flow files into the exe so they will be hidden from the user and just ran from the packaged application itself?

Generating an executable for my Electron Node-Red Application

Hello,

My goal is to generate an executable for my Electron Node-red Application, I am able to run the application locally using "npm install && npm start" only, please find below the steps that I used :

# Clone this repository

git clone https://github.com/natcl/electron-node-red.git
# Go into the repository
cd electron-node-red

#merged my flows and package file

./merger.js {used my path to my Node-RED project directory}

**then I tried to run it locally with success with commands yarn:

yarn
yarn start
In order to build an executable I used electron packager that I installed:

electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite
Packaging app for platform linux x64 using electron v10.1.7
Wrote new app to build/Node-RED-linux-x64

yarn && yarn dist -l
#failed error:
⨯ /home/engr/electron-node-red/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
AND
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

I was hoping if you can please help me on this.

Thanks in advance !

uiHost allow external access - not working

Is there something else to do to allow external access?

I tried to remove attribute "uiHost", but no success.
I also noticed, that acces from localhost is possible via 127.0.0.1:18880/ui, but not via :18880/ui.
With native node-red it is possible.

Thanks a lot for help.

Error!

Hi, I am trying your example but getting some errors. This is the debug log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'clean' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preclean', 'clean', 'postclean' ]
5 info lifecycle [email protected]preclean: [email protected]
6 info lifecycle [email protected]
clean: [email protected]
7 verbose lifecycle [email protected]clean: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
clean: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\LBO3FE.node-red\projects\electron-node-red\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\TwinCAT\Common64;C:\TwinCAT\Common32;C:\ProgramData\Oracle\Java\javapath;C:\Oracle\Oracle32\Cli11gR2040\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\7-Zip;C:\Program Files\7-Zip;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Siemens\Teamcenter11.2\Visualization\Products\Mockup\ClearanceDB;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\7-Zip;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Plantronics\Spokes3G;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\Program Files\nodejs;C:\Program Files (x86)\Brackets\command;C:\Program Files\Git\cmd;C:\Users\LBO3FE\AppData\Local\Google\Chrome\Application;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\TwinCAT\Common64;C:\TwinCAT\Common32;C:\ProgramData\Oracle\Java\javapath;C:\Oracle\Oracle32\Cli11gR2040\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\7-Zip;C:\Program Files\7-Zip;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Siemens\Teamcenter11.2\Visualization\Products\Mockup\ClearanceDB;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\7-Zip;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Plantronics\Spokes3G;C:\Program Files\nodejs;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\Users\LBO3FE\AppData\Roaming\npm;C:\Users\LBO3FE\AppData\Local\Calponia
9 verbose lifecycle [email protected]clean: CWD: C:\Users\LBO3FE.node-red\projects\electron-node-red
10 silly lifecycle [email protected]
clean: Args: [ '/d /s /c',
10 silly lifecycle 'rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin' ]
11 silly lifecycle [email protected]clean: Returned: code: 1 signal: null
12 info lifecycle [email protected]
clean: Failed to exec clean script
13 verbose stack Error: [email protected] clean: rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\LBO3FE.node-red\projects\electron-node-red
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "clean"
18 verbose node v10.15.3
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] clean: rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin
22 error Exit status 1
23 error Failed at the [email protected] clean script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

The uiHost setting is ignored

I'm developing an application that exposes some end-points on the local LAN.

I can create new end-points with the http-in block, and I can specify on which port to listen by settings the listenPort setting. Unfortunately, the parameter settings.uiHost on row 142 of main.js is ignored, the server always listens on localhost (127.0.0.1) only.
I've tried to comment the parameter as suggested, and I also tried to set it to: uiHost: "0.0.0.0", with no luck.

Anyone else having the same problem?

Issue: Copy-Paste doesn't work

On macOS 10.14.5 (18F132), copy-paste of text doesn't work

  • within Electron-Node-RED, and
  • between exterior and Electron-Node-RED.

For example,

  • comments of any node, or
  • id and password on the http request node

Thank you!

Issue: npm run build:osx fails

npm run build:osx fails.

[email protected] build:osx /Users/USER/electron-node-red
npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg

[email protected] pack:osx /Users/USER/electron-node-red
electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build --overwrite

Packaging app for platform darwin x64 using electron v2.0.18
Wrote new app to build/Node-RED-darwin-x64
sh: appdmg: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build:osx: npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build:osx script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/USER/.npm/_logs/2019-07-22T14_28_17_129Z-debug.log

  • /Users/USER/.npm/_logs/2019-07-22T14_28_17_129Z-debug.log contains

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build:osx' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild:osx', 'build:osx', 'postbuild:osx' ]
5 info lifecycle [email protected]prebuild:osx: [email protected]
6 info lifecycle [email protected]
build:osx: [email protected]
7 verbose lifecycle [email protected]build:osx: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
build:osx: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/USER/electron-node-red/node_modules/.bin:/usr/local/opt/libxslt/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/openssl/bin:/usr/local/opt/gettext/bin:/usr/local/opt/libxslt/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/gettext/bin:/usr/local/Cellar/php/7.3.3/bin/:/usr/local/opt/libpq/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/gettext/bin:/usr/local/opt/curl-openssl/bin:/usr/local/opt/openldap/sbin:/usr/local/opt/openldap/bin:/usr/local/opt/apr-util/bin:/usr/local/opt/apr/bin:/usr/local/opt/libpq/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/gettext/bin:/usr/local/opt/curl-openssl/bin:/usr/local/opt/openldap/sbin:/usr/local/opt/openldap/bin:/usr/local/opt/apr/bin:/usr/local/opt/apr-util/bin:/usr/local/opt/openssl/bin:/usr/local/opt/openssl/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/ncurses/bin:/usr/local/opt/gettext/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS
9 verbose lifecycle [email protected]build:osx: CWD: /Users/USER/electron-node-red
10 silly lifecycle [email protected]
build:osx: Args: [ '-c',
10 silly lifecycle 'npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg' ]
11 info lifecycle [email protected]~build:osx: Failed to exec build:osx script
12 verbose stack Error: [email protected] build:osx: npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid [email protected]
14 verbose cwd /Users/USER/electron-node-red
15 verbose Darwin 18.6.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:osx"
17 verbose node v10.16.0
18 verbose npm v6.10.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error [email protected] build:osx: npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg
23 error spawn ENOENT
24 error Failed at the [email protected] build:osx script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

Any suggestion to package electron-node-red successfully? Thank you!

can't make flow work same as original node-red

everything is ok, but I found connection problem when I run flow on electron-node-red. the flow can't keep reconnect alive, always shut down until you deploy it or restart the flow. But the same flow work well on original node-red platform (without use electron-node-red to pack). I am working on windows 10 system.
for example, if you plug net cable out when there are modbus (node-red-contrib-modbus version 5.14.0) are running, and a few seconds later you plug net cable in, but electron-node-red will not reconnect until you deploy it or restart it. But the original node-red platform (without use electron-node-red to pack) did reconnect and work very smoothly.
what's the reason of that? other function seems work good as original node-red platform.

Error Cannot fin module 'fs-extra

Hello.
After generating the .msi file (flow works perfectly with yarn start) I get the following error.
error
Any idea where the problem might be?

Thanks in advance

1.3.1 Feature Not Working: NPM Support

Hello,

I'm attempting a fresh setup with this electron-node-red v 1.3.1:

I set functionExternalModules as true as needed in the settings.

However the Setup tab in a Function node does not reveal the Modules fields as expected for npm support.

via console I RED.settings.functionExternalModules which returns false even though file is verified via multiple editors.

via console I RED.settings.functionExternalModules=true, which upon reload of a Function node, i see the new Modules fields,

Upon trying to utilize npm support & test with a simple inject->function->debugger flow, it produces output of:
"Error: Function node not allowed to load external modules"

I'm running on windows 10, yarn version 1.22.5, node version 14.5.1

Can anyone confirm this is problematic for them too?
If so does anyone have any suggestions on why this is happening and a way to fix it?
I really want to leverage this :)

Images to be package

Hi @dceejay ,

Need your help, how do I package my node-red directory so that the flow will be package as well and with my images.

Best regards,
Kenneth

Feature request: Using tabs

Today, Electron-Node-RED displays only one tab.

How to get multiple tabs, e.g. for editor, console, dashboard and world-map?

Thank you!

htppStatic in main.js

Hi.
I already have a project and I want to merge it with electron-node-red but the merger.js gives me an error, so I copied my flow to electronflow.
The problem is that I can't find where to put my static route configuration (from settings.js ) in main.js, the same with adminAuth, I hope you can help me

Accelerator - Failure

Sorry for my poor English...
I'm trying to activate the editor but it fails(Using CTRL_S+SHIFTD v+ I): Template & Version below;

var template = [{
label: "Application",
submenu: [
{ role: 'about' },
{ type: "separator" },
{ role: 'quit' }
]}, {
label: 'Node-RED',
submenu: [
{ label: 'Dashboard',
accelerator: "Shift+CmdOrCtrl+D", // Ctrl+Shift+D /// Shift+CmdOrCtrl+D
click() { mainWindow.loadURL("http://localhost:"+uiport+url); }
},
{ label: 'Editor',
accelerator: "Shift+CmdOrCtrl+E", // Ctrl+Shift+I // Shift+CmdOrCtrl+E
click() { mainWindow.loadURL("http://localhost:"+uiport+urledit); }
},
{ type: 'separator' },
{ label: 'Documentation',
.......
]

20 Set 11:47:14:176 - [info] Nodejs Version:12.4.0
20 Set 11:47:14:179 - [info] Chrome Version:76.0.3809.139
20 Set 11:47:14:188 - [info] Electron Version:6.0.7
20 Set 11:47:14:191 - [info] Node-RED Version:0.20.8
20 Set 11:47:14:192 - [info] V8 Version:7.6.303.31-electron.0
20 Set 11:47:14:194 - [info] Platform:linux
20 Set 11:47:14:195 - [info] Archictecture:x64
20 Set 11:47:14:197 - [info] Release:4.9.0-9-amd64
20 Set 11:47:14:198 - [info] CPUs:Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz - 2904Mhz
20 Set 11:47:14:200 - [info] TotalMem:2101657600
20 Set 11:47:14:247 - [info] FreeMem:75083776
20 Set 11:47:14:248 - [info] HostName:osboxes

Howto Fixit?

image render issue

Hi, i was trying to show the image of some IP cameras and I did in node-red, but today when I tried to package it for Windows with your code, the image is not visible, and the terminal returns this error "[11088:0220/134137.599:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is disabled, ANGLE is"
node-red:
cameras_node_red
electron-node-red:
image

Electron Node Red no longer logs to console

After chasing down a blank console issue, I loaded the dev tools and found that 'require' is not being recognised in the console.htm.
On further investigation I found that as well as nodeIntegration:true, there was a breaking change in Electron 12, which now requires contextIsolation:false if the require is to be included in the renderer process rather than main.js.
(see https://www.electronjs.org/docs/latest/breaking-changes#default-changed-contextisolation-defaults-to-true).
The following change should be made to main.js
webPreferences: {
//gma - node integration required for ipcRenderer in html
//gma - Breaking Change in Electron12, contextIsolation defaults to true
nodeIntegration: true,
contextIsolation: false,
nativeWindowOpen: true
}
Also, note that url.format is now deprecated, so it is recommended to use path.join;
conWindow.loadURL(path.join(__dirname, urlconsole));

Application stop at "Loading Node-RED" when running from dist.

If i run the exe created from yarn && yarn dist i get the application window but nothing more. It stops at "Loading Node-RED" i can activate the menu with ALT but see nothing in the console etc.

If i run the application with "yarn start" it works fine.
I looked with netstat and see no open port ( I fixed it at 18880 ) if i run it from dist.

I didn't change anything from the example in the readme.

Here is a similar error that have a fix, but i'm not smart enough to implement all that and make a pull request.
sakazuki/node-red-desktop#49

Here are output from console:
C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked>"Node-RED Electron.exe"

C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked>
Starting
ARG [
'C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\Node-RED Electron.exe'
]
Store C:\Users\eriklindstein\AppData\Roaming\electron_node_red
FlowFile : C:\Users\eriklindstein.node-red\electronflow.json
(node:9316) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'withFileTypes' of null
at e.readdir (electron/js2c/asar_bundle.js:5:9862)
at go$readdir (C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\resources\app.asar\node_modules\graceful-fs\graceful-fs.js:201:14)
at Object.readdir (C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\resources\app.asar\node_modules\graceful-fs\graceful-fs.js:198:12)
at Object.readdir (C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\resources\app.asar\node_modules\universalify\index.js:5:57)
at C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\resources\app.asar\node_modules@node-red\util\lib\i18n.js:53:16
at new Promise ()
at C:\Users\eriklindstein\projects\electron-node-red\dist\win-unpacked\resources\app.asar\node_modules@node-red\util\lib\i18n.js:51:16
(Use Node-RED Electron --trace-warnings ... to show where the warning was created)
(node:9316) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:9316) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any ideas?

error LGHT0103 : The system cannot find the file project.wixobj with type Source

When trying to compile for windows we get the error message below. Can you help us identify the reason for the error?

Thank you in advance

C:\p\i>yarn && yarn dist
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
$ electron-builder install-app-deps
• electron-builder version=22.11.7
• loaded configuration file=package.json ("build" field)
• rebuilding native dependencies [email protected] platform=win32 arch=x64
• rebuilding native dependency name=bcrypt version=5.0.1
Done in 13.24s.
yarn run v1.22.10
$ electron-builder
• electron-builder version=22.11.7 os=10.0.19043
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• rebuilding native dependencies [email protected] platform=win32 arch=x64
• rebuilding native dependency name=bcrypt version=5.0.1
• packaging platform=win32 arch=x64 electron=12.1.0 appOutDir=dist\win-unpacked
• building target=MSI arch=x64 file=dist\green.exe
⨯ Exit code: 103. Command failed: C:\Users\apps\AppData\Local\electron-builder\Cache\wix\wix-4.0.0.5512.2\light.exe -out C:\p\i\dist\green.exe -v -spdb -sw1076 -dappDir=C:\p\i\dist\win-unpacked -pedantic -wx project.wixobj
light.exe : error LGHT0103 : The system cannot find the file 'project.wixobj' with type 'Source'.

light.exe : error LGHT0103 : The system cannot find the file 'project.wixobj' with type 'Source'.
failedTask=build stackTrace=Error: Exit code: 103. Command failed: C:\Users\apps\AppData\Local\electron-builder\Cache\wix\wix-4.0.0.5512.2\light.exe -out C:\p\i\dist\green.exe -v -spdb -sw1076 -dappDir=C:\p\i\dist\win-unpacked -pedantic -wx project.wixobj
light.exe : error LGHT0103 : The system cannot find the file 'project.wixobj' with type 'Source'.

light.exe : error LGHT0103 : The system cannot find the file 'project.wixobj' with type 'Source'.

at C:\p\i\node_modules\builder-util\src\util.ts:132:18
at ChildProcess.exithandler (node:child_process:316:5)
at ChildProcess.emit (node:events:329:20)
at maybeClose (node:internal/child_process:1055:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Loading extra resources for application

Hello, at start I would like to thank you for developing this template.
I'm trying to make my first app that will work on a computer without internet access, however to draw graph i use node-red-node-ui-vega which unfortunately fetches data from CDN.
Fortunately in Node-RED if a module has a directory called resources at the top level, the runtime will make anything in that directory available to the editor under the url /resources// https://nodered.org/docs/creating-nodes/resources.
So i save source from CDN as .js files and place them in resources folder. Everything works great when i run node-red from terminal, I have acces to files like http://localhost:1880/resources/node-red-node-ui-vega/vega-cdn.js ect.
But when I build app or try it by yarn start i get Cannot GET /resources/node-red-node-ui-vega/vega-cdn.js even though i have access to editor and UI on app port(18880 set in main.js).
Has anyone encountered a similar problem or can give me some guidance.?Thanks in advance.

A JavaScript error occurs at launch

On Windows 10 2004 and Node v12.16.3,

git clone https://github.com/dceejay/electron-node-red.git
cd electron-node-red
sudo npm i -g yarn
yarn
yarn dist
dist\Node-RED Electron 1.1.0.msi

The following error message is displayed:

Capture 2020-07-02 18-09-25

However, ignoring the error doesn't seem to have an impact on Electron-Node-RED.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.