For performance DFN doesn't actually use "npm" to install npm modules. It just uses the npm REST API to pull down the files.
This has the side effect that it doesn't run the post install script the way the npm CLI tool normally would. While this is good for security (DFN won't automatically any downloaded code on your local computer) it means some packages won't work.
A potential example (yet to be tested) is sqlite: https://www.npmjs.com/package/sqlite
For packages that require a post install script should DFN just run these scripts? Or should it ask the user for permission to run these scripts?
I'm thinking it should ask permission. It means the evaluation engine will need to be able to query user before running these scripts and then completing the notebook install or evaluation.
A workaround for this issue might be to open a terminal, change directory to where the notebook is saved and install the required npm module manually:
cd where/notebook/is/saved
npm install sqlite
For performance DFN doesn't actually use "npm" to install npm modules. It just uses the npm REST API to pull down the files.
This has the side effect that it doesn't run the post install script the way the npm CLI tool normally would. While this is good for security (DFN won't automatically any downloaded code on your local computer) it means some packages won't work.
A potential example (yet to be tested) is sqlite: https://www.npmjs.com/package/sqlite
For packages that require a post install script should DFN just run these scripts? Or should it ask the user for permission to run these scripts?
I'm thinking it should ask permission. It means the evaluation engine will need to be able to query user before running these scripts and then completing the notebook install or evaluation.
A workaround for this issue might be to open a terminal, change directory to where the notebook is saved and install the required npm module manually:
cd where/notebook/is/saved npm install sqlite