question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing "@scope/package" front-end library through uibuilder manager fails

See original GitHub issue

Continuing this from Slack last night: I’m trying to install a front-end library through the library manager in the node. Goal is to have the library served through express so the parts can be used in the frontend code.

With NR settings to trace log level, and enabling a log file with the npm install, the following lines get written to the log:

26 Sep 19:58:25 - [info] [uibuilder/uibnpmmanage] Admin API. Running npm install for package @syncfusion/ej2-vue-schedule
26 Sep 19:58:52 - [trace] [uibuilder/uibnpmmanage] Writing stdout to /home/pi/.node-red/uibuilder/home/pi/.node-red/uibuilder/.config/npm-out-latest.txt
26 Sep 19:58:52 - [error] [uibuilder/uibnpmmanage] Admin API. npm command failed. npm install for package @syncfusion/ej2-vue-schedule

Since I was just uncommenting debug code, I didn’t care about the path in there, but if this ever is turned into an option it will need a bit of work 😃 Gets written to the correct path though.

npm-out-latest.txt

However, manually running the code described in the relevant files, will have no failures in installing, and will have require.resolve() find the correct path.

pi@neela:~/.node-red $ node
> const path = require('path')
undefined
> const fs = require('fs-extra')
undefined
> require.resolve('@syncfusion/ej2-vue-schedule', {paths: ['/home/pi/.node-red/']})
'/home/pi/.node-red/node_modules/@syncfusion/ej2-vue-schedule/dist/ej2-vue-schedule.umd.min.js'
> path.dirname(require.resolve('@syncfusion/ej2-vue-schedule', {paths: ['/home/pi/.node-red/']}))
'/home/pi/.node-red/node_modules/@syncfusion/ej2-vue-schedule/dist'
> 
pi@neela:~/.node-red $ npm install --no-audit --no-update-notifier --save --production --color=false --json @syncfusion/ej2-vue-schedule
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN @syncfusion/ej2-vue-base@17.2.47 requires a peer of vue@2.5.2 - 2.5.21 but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

{
  "added": [
    {
      "action": "add",
      "name": "@syncfusion/ej2-file-utils",
      "version": "17.2.47",
      "path": "/home/pi/.node-red/node_modules/@syncfusion/ej2-file-utils"
    },
    {
      "action": "add",
      "name": "@syncfusion/ej2-compression",
      "version": "17.2.47",
      "path": "/home/pi/.node-red/node_modules/@syncfusion/ej2-compression"
    },
    ... // see the attached file for an exact copy
}

Software and Package Versions

Software Version
Node.JS 10.16.0
npm 6.9.0
Node-RED 0.20.8
uibuilder node 2.0.3
uibuilderFE 2.0.2
OS Raspbian Stretch on Pi3B+
Browser Firefox 69.0.1 on MacOS Mojave 10.14.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
boisei0commented, Sep 28, 2019

Understandable, perfect for me, just something that’s good to be aware of. And now that it’s known and documented on the TODO list, others potentially running into the same issue can find out too.

0reactions
TotallyInformationcommented, Sep 28, 2019

Thanks Lena for your updates, I’ve added “I have a workaround to just use a local install plus build step for development” as workaround number 4 and made it the recommended approach for now.

As there are 3 viable workarounds, I’m going to close this issue now since it is unlikely to actually get an enhancement any time soon. Sorry. 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-red-contrib-uibuilder (node)
Easily create data-driven web UI's for Node-RED using any (or no) front-end library. npm install node-red-contrib-uibuilder.
Read more >
uibuilder Technical Documentation - Totally Information
Information on using the front-end client libraries in your own code, creating templates, using build processes if you need them. Using the new ......
Read more >
Scoped registries - Unity - Manual
Scoped registries allow Unity to communicate the location of any custom package registry server to the Package Manager so that the user has...
Read more >
node-red-contrib-uibuilder - npm
Easily create data-driven web UI's for Node-RED using any (or no) front-end library.. Latest version: 6.0.0, last published: 8 days ago.
Read more >
Creating a React component library using Storybook 6
Another benefit is that you can develop UI components easily in isolation and ... If you have a component library using React already...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found