Having trouble installing/using xmlhttprequest - node.js

I am taking my first steps in node.js/node-RED and need to do http requests (GET, POST with and without xml payload) from a node component so I figured that xmlhttprequest is my best option. I have npm-installed it. Actually installed it in ~/.node-red/node_modules and /usr/local/lib/node_modules but each time I launch node-RED it does not activate my node component with the following error:
Welcome to Node-RED
===================
7 Aug 09:05:20 - [info] Node-RED version: v0.17.5
7 Aug 09:05:20 - [info] Node.js version: v6.11.2
7 Aug 09:05:20 - [info] Darwin 16.7.0 x64 LE
7 Aug 09:05:20 - [info] Loading palette nodes
7 Aug 09:05:21 - [warn] ------------------------------------------------------
7 Aug 09:05:21 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
7 Aug 09:05:21 - [warn] [synaptiq-solar] Error: Cannot find module 'xmlhttprequest'
7 Aug 09:05:21 - [warn] ------------------------------------------------------
7 Aug 09:05:21 - [info] Settings file : /Users/rudi/.node-red/settings.js
7 Aug 09:05:21 - [info] User directory : /Users/rudi/.node-red
7 Aug 09:05:21 - [info] Flows file : /Users/rudi/.node-red/flows_Rudi.local.json
7 Aug 09:05:21 - [info] Server now running at http://127.0.0.1:1880/
7 Aug 09:05:21 - [info] Waiting for missing types to be registered:
7 Aug 09:05:21 - [info] - synaptiq-solar
The name of my component is synaptiq-solar and its code starts with requiring the xmlhttprequest component like this:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
Also, my package.json has a dependency section referring to xmlhttprequest as you can see below:
{
"name": "synaptiq-solar",
"version": "0.0.1",
"description": "Just playing around, learning how to create a custom node",
"dependencies": {
"xmlhttprequest": "1.8.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"node-red": {
"nodes": {
"synaptiq-solar": "synaptiq-solar.js"
}
},
"author": "Smappee n.v.",
"license": "ISC"
}
So what am I doing wrong? Should I install the xmlhttprequest component in some other location? Is there another lib directory that node-RED is looking to find dependend components?

If a custom node has an external dependency, it should declare it within its package.json file so that they get installed alongside your custom module.
If you have created this as a "local" node (with just a .js and .html file in the nodes directory and no package.json), you should move over to creating it as a module.
The documentation includes a guide on properly packaging your node: https://nodered.org/docs/creating-nodes/packaging

Related

Azure pipelines can't find test results file

I realize that a similar question has been asked here. However, not only has no answer been accepted, but the answer isn't really an answer.
I have a very simple build pipeline that builds a nx workspace and tests it. The issue that I am seeing is that when I run the test portion of the pipeline, test results files are created but the publish test results task can't find the files.
My karma.conf.js is as follows
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const { join } = require("path");
const { constants } = require("karma");
module.exports = () => {
return {
basePath: "",
frameworks: ["jasmine", "#angular-devkit/build-angular"],
plugins: [
require("karma-jasmine"),
require("karma-chrome-launcher"),
require("karma-jasmine-html-reporter"),
require("#angular-devkit/build-angular/plugins/karma"),
require("karma-coverage"),
require("karma-mocha-reporter"),
require("karma-nunit2-reporter"),
require("karma-spec-reporter"),
],
client: {
clearContext: false,
jasmine: {
random: false,
},
},
jasmineHtmlReporter: {
suppressAll: true,
},
reporters: ["mocha", "coverage", "spec", "nunit"],
mochaReporter: {
output: "minimal",
ignoreSkipped: true,
maxLogLines: 5,
},
nunitReporter: {
outputFile: "src\\e2e\\test-results\\TEST-karma.xml",
},
reportSlowerThan: 500,
port: 9876,
colors: true,
logLevel: constants.LOG_INFO,
autoWatch: true,
browsers: ["Chrome"],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
chromeDebugging: {
base: "Chrome",
flags: ["--remote-debugging-port=9333"],
},
headlessChrome: {
base: "ChromeHeadless",
flags: [
"--no-sandbox",
"--no-proxy-server",
"--disable-web-security",
"--disable-gpu",
"--js-flags=-max-old-space-size=8196",
],
},
},
preprocessors: {
"src/**/*.js": ["coverage"],
},
};
};
And the relevant portions of the pipeline configuration are:
- script: npx nx affected --target=test --parallel --max-parallel=2 --no-watch --browsers headlessChrome --reporters nunit
displayName: Test Affected Projects
- script: cd apps/portfolio/src/e2e/test-results && ls
condition: succeededOrFailed()
- task: PublishTestResults#2
condition: succeededOrFailed()
inputs:
testResultsFormat: NUnit
searchFolder: "$(system.defaultWorkingDirectory)/**/src/e2e/test-results"
testResultsFiles: "TEST-karma.xml"
mergeTestResults: true
Overall the pipeline succeeds but the output is not what I was expecting.
2022-03-11T15:06:33.8808764Z ##[section]Starting: Test Affected Projects
2022-03-11T15:06:33.8816403Z ==============================================================================
2022-03-11T15:06:33.8816705Z Task : Command line
2022-03-11T15:06:33.8816986Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2022-03-11T15:06:33.8817255Z Version : 2.200.2
2022-03-11T15:06:33.8817446Z Author : Microsoft Corporation
2022-03-11T15:06:33.8817875Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2022-03-11T15:06:33.8818232Z ==============================================================================
2022-03-11T15:06:34.0062774Z Generating script.
2022-03-11T15:06:34.0070315Z Script contents:
2022-03-11T15:06:34.0071200Z npx nx affected --target=test --parallel --max-parallel=2 --no-watch --browsers headlessChrome --reporters nunit
2022-03-11T15:06:34.0071854Z ========================== Starting Command Output ===========================
2022-03-11T15:06:34.0090870Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/f1d1558c-ec90-4297-a8d7-21c5560acce3.sh
2022-03-11T15:06:34.8996294Z
2022-03-11T15:06:34.9036218Z > NX No explicit --base argument provided, but found environment variable NX_BASE so using its value as the affected base: $(git rev-parse origin/main)
2022-03-11T15:06:34.9037131Z
2022-03-11T15:06:34.9037511Z
2022-03-11T15:06:34.9038616Z > NX No explicit --head argument provided, but found environment variable NX_HEAD so using its value as the affected head: 7e6371ebd645b9aea7aba9dc5dcef876334321a2
2022-03-11T15:06:34.9039279Z
2022-03-11T15:06:50.7772679Z
2022-03-11T15:06:50.7774790Z > nx run portfolio:test --no-watch --browsers=headlessChrome --reporters=nunit
2022-03-11T15:06:50.7775838Z - Generating browser application bundles (phase: setup)...
2022-03-11T15:06:50.7777536Z [32m10 03 2022 21:26:42.906:INFO [preprocessor.coverage]: [39mcoverage not included in reporters [ 'nunit' ]
2022-03-11T15:06:50.7778372Z ✔ Browser application bundle generation complete.
2022-03-11T15:06:50.7779633Z [32m10 03 2022 21:26:50.156:INFO [karma-server]: [39mKarma v6.3.17 server started at http://localhost:9876/
2022-03-11T15:06:50.7780634Z [32m10 03 2022 21:26:50.157:INFO [launcher]: [39mLaunching browsers headlessChrome with concurrency unlimited
2022-03-11T15:06:50.7781477Z [32m10 03 2022 21:26:50.165:INFO [launcher]: [39mStarting browser ChromeHeadless
2022-03-11T15:06:50.7782434Z [32m10 03 2022 21:26:54.147:INFO [Chrome Headless 99.0.4844.51 (Linux x86_64)]: [39mConnected on socket XMnFRYM5I2QyT8ZWAAAB with id 75945850
2022-03-11T15:06:50.7782830Z
2022-03-11T15:06:50.7785244Z
2022-03-11T15:06:50.7785379Z
2022-03-11T15:06:50.8883421Z
2022-03-11T15:06:50.8885915Z > nx run home:test --no-watch --browsers=headlessChrome --reporters=nunit
2022-03-11T15:06:50.8886904Z - Generating browser application bundles (phase: setup)...
2022-03-11T15:06:50.8888008Z [32m10 03 2022 21:21:54.923:INFO [preprocessor.coverage]: [39mcoverage not included in reporters [ 'nunit' ]
2022-03-11T15:06:50.8888994Z ✔ Browser application bundle generation complete.
2022-03-11T15:06:50.8890710Z [32m10 03 2022 21:22:08.464:INFO [karma-server]: [39mKarma v6.3.17 server started at http://localhost:9876/
2022-03-11T15:06:50.8891823Z [32m10 03 2022 21:22:08.465:INFO [launcher]: [39mLaunching browsers headlessChrome with concurrency unlimited
2022-03-11T15:06:50.8892684Z [32m10 03 2022 21:22:08.469:INFO [launcher]: [39mStarting browser ChromeHeadless
2022-03-11T15:06:50.8893639Z [32m10 03 2022 21:22:19.091:INFO [Chrome Headless 99.0.4844.51 (Linux x86_64)]: [39mConnected on socket kf6bzFTypLCiZrEeAAAB with id 63557301
2022-03-11T15:06:50.8894051Z
2022-03-11T15:06:50.8896419Z
2022-03-11T15:06:50.8896796Z
2022-03-11T15:06:51.0715055Z
2022-03-11T15:06:51.0716746Z > nx run core-ui:test --no-watch --browsers=headlessChrome --reporters=nunit
2022-03-11T15:06:51.0717452Z - Generating browser application bundles (phase: setup)...
2022-03-11T15:06:51.0718458Z [32m10 03 2022 21:21:54.930:INFO [preprocessor.coverage]: [39mcoverage not included in reporters [ 'nunit' ]
2022-03-11T15:06:51.0719083Z ✔ Browser application bundle generation complete.
2022-03-11T15:06:51.0719931Z [32m10 03 2022 21:22:08.422:INFO [karma-server]: [39mKarma v6.3.17 server started at http://localhost:9877/
2022-03-11T15:06:51.0720750Z [32m10 03 2022 21:22:08.423:INFO [launcher]: [39mLaunching browsers headlessChrome with concurrency unlimited
2022-03-11T15:06:51.0721448Z [32m10 03 2022 21:22:08.427:INFO [launcher]: [39mStarting browser ChromeHeadless
2022-03-11T15:06:51.0722283Z [32m10 03 2022 21:22:19.091:INFO [Chrome Headless 99.0.4844.51 (Linux x86_64)]: [39mConnected on socket fE5V6U9cgdViTj6nAAAB with id 33194964
2022-03-11T15:06:51.0722643Z
2022-03-11T15:06:51.0722824Z
2022-03-11T15:06:51.0722903Z
2022-03-11T15:06:51.0722994Z
2022-03-11T15:06:51.0723244Z > NX Successfully completed running the command.
2022-03-11T15:06:51.0723403Z
2022-03-11T15:06:51.0723725Z See run details at https://nx.app/runs/8yGag21GbWW
2022-03-11T15:06:51.0723889Z
2022-03-11T15:06:51.0902196Z ##[section]Finishing: Test Affected Projects
2022-03-11T15:06:51.0928478Z ##[section]Starting: CmdLine
2022-03-11T15:06:51.0936040Z ==============================================================================
2022-03-11T15:06:51.0936338Z Task : Command line
2022-03-11T15:06:51.0936623Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2022-03-11T15:06:51.0936913Z Version : 2.200.2
2022-03-11T15:06:51.0937102Z Author : Microsoft Corporation
2022-03-11T15:06:51.0937396Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2022-03-11T15:06:51.0937799Z ==============================================================================
2022-03-11T15:06:51.2211419Z Generating script.
2022-03-11T15:06:51.2219976Z Script contents:
2022-03-11T15:06:51.2221506Z cd apps/portfolio/src/e2e/test-results && ls
2022-03-11T15:06:51.2221892Z ========================== Starting Command Output ===========================
2022-03-11T15:06:51.2241765Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/5e4cb0b9-23dd-43cd-952b-d4c9b74f3483.sh
2022-03-11T15:06:51.2304790Z TEST-karma.xml
2022-03-11T15:06:51.2362372Z ##[section]Finishing: CmdLine
2022-03-11T15:06:51.2382031Z ##[section]Starting: PublishTestResults
2022-03-11T15:06:51.2387550Z ==============================================================================
2022-03-11T15:06:51.2387836Z Task : Publish Test Results
2022-03-11T15:06:51.2388062Z Description : Publish test results to Azure Pipelines
2022-03-11T15:06:51.2388276Z Version : 2.198.0
2022-03-11T15:06:51.2388503Z Author : Microsoft Corporation
2022-03-11T15:06:51.2388799Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
2022-03-11T15:06:51.2389162Z ==============================================================================
2022-03-11T15:06:51.3780924Z [command]/usr/bin/dotnet --version
2022-03-11T15:06:51.5740113Z 6.0.200
2022-03-11T15:06:51.5794851Z ##[warning]No test result files matching TEST-karma.xml were found.
2022-03-11T15:06:51.6214350Z ##[section]Finishing: PublishTestResults
As is evident in the second section of the logs above, the file exists but according to the step after that, no files exist.
I get the same results whether I use JUnit or NUnit and a majority of my configuration is copied from a working pipeline at my work.
I found my answer by messing around with the configuration for the pipeline:
- task: PublishTestResults#2
condition: succeededOrFailed()
inputs:
testResultsFormat: NUnit
testResultsFiles: "**/TEST-*.xml"
mergeTestResults: true
rather than having a search folder and a testResultsFiles property i used only the testResultsFiles property and prefixed it with a recursive search for any file that starts with TEST- and is an xml file

In Azure pipelines, how do you set up X display for headless Chrome testing?

In our Azure Pipeline, we are attempting to run end-to-end tests in our Angular 9 application, using the following task ...
The package.json defines this ...
"scripts": {
...
"e2e": "npm run install-puppeteer && ng e2e"
},
but when the agent runs the above task, it dies with "Unable to open X display" error ...
> npm run install-puppeteer && ng test "--watch=false" "--codeCoverage=true"
> thermo-protect-ui#0.0.0 install-puppeteer /home/vsts/work/1/s
> cd node_modules/puppeteer && npm run install
> puppeteer#5.5.0 install /home/vsts/work/1/s/node_modules/puppeteer
> node install.js
Chromium is already in /home/vsts/work/1/s/node_modules/puppeteer/.local-chromium/linux-818858; skipping download.
08 12 2020 18:54:56.858:INFO [karma-server]: Karma v4.4.1 server started at http://0.0.0.0:9876/
08 12 2020 18:54:56.863:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
08 12 2020 18:54:56.866:INFO [launcher]: Starting browser Chrome
08 12 2020 18:54:57.134:ERROR [launcher]: Cannot start Chrome
[2099:2099:1208/185457.060113:ERROR:browser_main_loop.cc(1439)] Unable to open X display.
08 12 2020 18:54:57.134:ERROR [launcher]: Chrome stdout:
08 12 2020 18:54:57.135:ERROR [launcher]: Chrome stderr: [2099:2099:1208/185457.060113:ERROR:browser_main_loop.cc(1439)] Unable to open X display.
08 12 2020 18:54:57.675:INFO [launcher]: Trying to start Chrome again (1/2).
08 12 2020 18:54:59.035:ERROR [launcher]: Cannot start Chrome
22 error Exit status 1
23 error Failed at the thermo-protect-ui#0.0.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Normally this kind of thing is dealt with by installing Xvfb. How do I do that using Azure pipelines?
Really this is #Hugh Lin's answer from the comments but for the benefit of posterity I created a bash task which ran a script in my repository. The script contained
#!/bin/bash
xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' npm run test -- --watch=false --codeCoverage=true
Then the tests ran successfully.

Node red on-close event does not wait for async function to finish

According to the documentation
https://nodered.org/docs/creating-nodes/node-js
when Node-red (or the specific node in question) closes down,the "close" event is called and if a listener is registered with a parameter it should wait for done() before completely stopping.
this.on('close', function(done) {
doSomethingWithACallback(function() {
done();
});
});
It doesn't work for me though. My mistake, I'm sure, but I don't see where. The following code displays the first "Closing" entry in the log, but not the second entry "Waited enough. Actually finishing now.":
node.on("close", function(done) {
node.log('Closing.');
setTimeout(function(){
node.log('Waited enough.Actually finishing now.');
done();
},5000);
});
Can someone please give me a pointer ?
Using:
Node-red 0.17.5
node.js 6.14.1
Edit: output log added below
pi#raspberrypi:~ $ node-red-start
Start Node-RED
Once Node-RED has started, point a browser at http://192.168.1.17:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
To find more nodes and example flows - go to http://flows.nodered.org
Starting as a systemd service.
Started Node-RED graphical event wiring tool..
16 Apr 10:11:27 - [info]
Welcome to Node-RED
===================
16 Apr 10:11:27 - [info] Node-RED version: v0.17.5
16 Apr 10:11:27 - [info] Node.js version: v6.14.1
16 Apr 10:11:27 - [info] Linux 4.14.30-v7+ arm LE
16 Apr 10:11:30 - [info] Loading palette nodes
16 Apr 10:11:47 - [info] Dashboard version 2.7.0 started at /ui
16 Apr 10:11:50 - [info] Settings file : /home/pi/.node-red/settings.js
16 Apr 10:11:50 - [info] User directory : /home/pi/.node-red
16 Apr 10:11:50 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
16 Apr 10:11:50 - [info] Server now running at http://127.0.0.1:1880/
16 Apr 10:11:51 - [info] Starting flows
16 Apr 10:11:51 - [info] Started flows
Stopping Node-RED graphical event wiring tool....
16 Apr 10:12:06 - [info] Stopping flows
16 Apr 10:12:06 - [info] [simple-queue:queue1] Closing.
Stopped Node-RED graphical event wiring tool..
You are hitting a bug that was fixed in Node-RED 0.18.
Prior to Node-RED 0.18, the code that handled the shutdown of the runtime did not wait for the all of the node close handlers to complete before the process was terminated.

Angular Quickstart fails karma testing out of the box

The official Angular quickstart is not able to run karma tests after a clean install on Windows 10. I typed the following 4 commands and nothing else:
C:\projects\temp>git clone https://github.com/angular/quickstart.git
C:\projects\temp>cd C:\projects\temp\quickstart
C:\projects\temp\quickstart>npm install
...install logs omitted for brevity
C:\projects\temp\quickstart>npm start
...app launched successfully, but logs omitted for brevity
C:\projects\temp\quickstart>npm test
...Error shown in complete logs below
The full error message resulting after the final command is as follows:
C:\projects\temp\quickstart>npm test
> angular-quickstart#1.0.0 pretest C:\projects\temp\quickstart
> npm run build
> angular-quickstart#1.0.0 build C:\projects\temp\quickstart
> tsc -p src/
> angular-quickstart#1.0.0 test C:\projects\temp\quickstart
> concurrently "npm run build:watch" "karma start karma.conf.js"
[0]
[0] > angular-quickstart#1.0.0 build:watch C:\projects\temp\quickstart
[0] > tsc -p src/ -w
[0]
[1] 01 06 2017 14:33:49.385:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.js" does not match any file.
[1] 01 06 2017 14:33:49.406:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.ts" does not match any file.
[1] 01 06 2017 14:33:49.407:WARN [watcher]: Pattern "C:/projects/temp/quickstart/testing/**/*.js.map" does not match any file.
[1] 01 06 2017 14:33:49.891:WARN [karma]: No captured browser, open http://localhost:9876/
[1] 01 06 2017 14:33:49.906:WARN [karma]: Port 9876 in use
[1] 01 06 2017 14:33:49.908:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9877/
[1] 01 06 2017 14:33:49.908:INFO [launcher]: Launching browser Chrome with unlimited concurrency
[1] 01 06 2017 14:33:49.958:INFO [launcher]: Starting browser Chrome
[1] 01 06 2017 14:33:51.821:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.component.js".
[1] 01 06 2017 14:33:51.843:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.component.spec.js".
[1] 01 06 2017 14:33:51.850:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/app/app.module.js".
[0] 2:33:51 PM - Compilation complete. Watching for file changes.
[1] 01 06 2017 14:33:51.873:INFO [watcher]: Changed file "C:/projects/temp/quickstart/src/main.js".
[1] 01 06 2017 14:33:51.965:INFO [Chrome 58.0.3029 (Windows 10 0.0.0)]: Connected on socket pXysNFDP8RC3agm8AAAA with id 9156960
[1] 01 06 2017 14:33:52.077:INFO [karma]: Delaying execution, these browsers are not ready: Chrome 58.0.3029 (Windows 10 0.0.0)
What needs to change in order for npm test to succeed out of the box on Windows 10?
The Angular quickstart project has largely been superseded by the Angular CLI. I would suggest using the CLI it for any new projects as it not only gives you an initial framework for your application, but it will also generate the additional boilerplate needed as you extend your application.
Before installing Angular CLi, ensure you have an up to date version of Node (6.9.0 or higher) and NPM (3 or higher). Also there may be other prerequisites not listed in the documentation, to install on an Android system I found it also needed Python 2.7 and g++ installed.
Install with:
npm install -g #angular/cli
To create a new project:
ng new PROJECT-NAME
cd PROJECT-NAME
ng serve
ng new will take some time to complete as in addition to building the project structure it also does the npm install.
Run unit tests with ng test and end-to-end tests with ng e2e.
Both ng test and ng serve will run continuously watching for changes and rebuilding the affected code. You can even leave both running in separate windows if you wish.
ng generate BLUEPRINT will generate new code, blueprints include module, component, service, class, directive, enum, guard, interface, pipe
Other useful commands:. You may want to experiment with this a bit before you write a real app: by default each component or service goes into its own subdirectory and is added to the top level app module, but you can explicitly create modules to provide additional structure if you wish.
ng build: builds your application into the output path.
ng doc KEYWORD: opens angular documentation for that keyword.
ng eject: ejects the app and outputs webpack configuration
ng lint: lints the project
ng xi18n: extracts i18n messages from the project.
This is not answer, just give more case to find out root cause.
I followed steps which you described and got this:
D:\Project\temp\quickstart>npm test
> angular-quickstart#1.0.0 pretest D:\Project\temp\quickstart
> npm run build
> angular-quickstart#1.0.0 build D:\Project\temp\quickstart
> tsc -p src/
> angular-quickstart#1.0.0 test D:\Project\temp\quickstart
> concurrently "npm run build:watch" "karma start karma.conf.js"
[0]
[0] > angular-quickstart#1.0.0 build:watch D:\Project\temp\quickstart
[0] > tsc -p src/ -w
[0]
[1] 02 06 2017 22:34:04.733:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.js" does not match any file.
[1] 02 06 2017 22:34:04.746:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.ts" does not match any file.
[1] 02 06 2017 22:34:04.747:WARN [watcher]: Pattern
"D:/Project/temp/quickstart/testing/**/*.js.map" does not match any file.
[1] 02 06 2017 22:34:05.103:WARN [karma]: No captured browser, open
http://localhost:9876/
[1] 02 06 2017 22:34:05.120:INFO [karma]: Karma v1.7.0 server started at
http://0.0.0.0:9876/
[1] 02 06 2017 22:34:05.120:INFO [launcher]: Launching browser Chrome with
unlimited concurrency
[1] 02 06 2017 22:34:05.156:INFO [launcher]: Starting browser Chrome
[1] 02 06 2017 22:34:06.742:INFO [Chrome 58.0.3029 (Windows 10 0.0.0)]:
Connected on socket GGConP8Ks64GubSYAAAA with id 70486747
[1] 02 06 2017 22:34:07.822:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.component.js".
[1] 02 06 2017 22:34:07.837:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.component.spec.js".
[1] 02 06 2017 22:34:07.856:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/app/app.module.js".
[0] 10:34:07 PM - Compilation complete. Watching for file changes.
[1] 02 06 2017 22:34:07.865:INFO [watcher]: Changed file
"D:/Project/temp/quickstart/src/main.js".
[1] 02 06 2017 22:34:08.084:INFO [karma]: Delaying execution, these browsers
are not ready: Chrome 58.0.3029 (Windows 10 0.0.0)
Chrome 58.0.3029 (Windows 10 0.0.0): Executed 2 of 2 SUCCESS (0.159 secs /
0.149 secs)
Chrome 58.0.3029 (Windows 10 0.0.0): Executed 2 of 2 SUCCESS (0.117 secs /
0.112 secs)

BBB Palette not displayed on Node-Red on Beaglebone Black Wireless

My node-red installation does not display the nodes needed for accessing beaglebone IOs (node-red-node-beaglebone).
In my opinion error is actually caused because node-red-node-beaglebone loads octalbonescript which needs serialport, and something requests serialPort instead of serialport there.
I already tried the preinstalled, stable and lts nodejs version. Additionally npm#2 and npm#3 for installing the nodes. The .node-red folder was also already deleted by me and the node-red-node-beaglebone packaged got installed in the .node-red/node_modules folder started from scrach.
root#beaglebone:/etc# cat debian_version
8.7
root#beaglebone:~# npm -v
2.15.11
root#beaglebone:~# uname -a
Linux beaglebone 4.4.30-ti-r64 #1 SMP Fri Nov 4 21:23:33 UTC 2016 armv7l GNU/Linux
root#beaglebone:~# export AUTO_LOAD_CAPE=0 #optional
root#beaglebone:~# node-red-pi
1487183133432 Board Looking for connected device
15 Feb 19:25:34 - [info]
Welcome to Node-RED
===================
15 Feb 19:25:34 - [info] Node-RED version: v0.16.2
15 Feb 19:25:34 - [info] Node.js version: v6.9.5
15 Feb 19:25:34 - [info] Linux 4.4.30-ti-r64 arm LE
15 Feb 19:25:44 - [info] Loading palette nodes
15 Feb 19:25:57 - [warn] ------------------------------------------------------
15 Feb 19:25:57 - [warn] [bbb] ReferenceError: serialPort is not defined +seems to be the problem
15 Feb 19:25:57 - [warn] ------------------------------------------------------
15 Feb 19:25:57 - [info] Settings file : /root/.node-red/settings.js
15 Feb 19:25:57 - [info] User directory : /root/.node-red
15 Feb 19:25:57 - [info] Flows file : /root/.node-red/flows_beaglebone.json
15 Feb 19:25:57 - [info] Creating new flow file
15 Feb 19:25:57 - [debug] loaded flow revision: 513fd923d68021b8ee98fcb250470340
15 Feb 19:25:57 - [debug] red/runtime/nodes/credentials.load : no user key present
15 Feb 19:25:57 - [debug] red/runtime/nodes/credentials.load : using default key
15 Feb 19:25:57 - [info] Starting flows
15 Feb 19:25:57 - [info] Started flows
15 Feb 19:25:57 - [info] Server now running at http://127.0.0.1:1880/

Resources