Skip to content

DFN doesn't run "post install" scripts when installing npm modules. #21

Description

@ashleydavis

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdesignDiscussion about the design of Data-Forge Notebook

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions