I've installed a js library https://www.npmjs.com/package/fft with npm, how can I make this available in node-red functions ?
相关问题
- Failed at the electron@1.8.2 postinstall script
- Webpack getting started, import error
- No member named ForceSet
- AWS Elastic BeanStalk nodejs Deployment error
- node local dependency installs as shortcut and nes
相关文章
- @angular-cli install fails with deprecated request
- Create React App not installing, showing an error
- new field false in Package.json
- npm : Postinstall not running in docker
- Babel CLI is extremely slow
- Docker and npm - gyp ERR! not ok
- Is there an npm module to modify a pdf file in nod
- Vscode: error TS2307: Cannot find module 'vsco
This is covered towards the end of the Configuration and the Writing Functions sections of the Node-RED docs
You need to add npm modules to the
settings.js
file. You can find this file in~/.node-red/
The section you are looking for is the
functionGlobalContext
section.You would then access the module in the function node with the following:
Also be careful where you installed the fft module, it needs to be either in
~/.node-red/node_modules
or installed globally so it is accessable to Node-RED