Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify use and lifecycle of modules imports #1889

Closed
jpravetz opened this issue Jun 7, 2024 · 1 comment
Closed

Clarify use and lifecycle of modules imports #1889

jpravetz opened this issue Jun 7, 2024 · 1 comment
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@jpravetz
Copy link

jpravetz commented Jun 7, 2024

Problem/Motivation

Clarify lifecycle of modules in documentation

Proposed changes

Provide documentation on

  • how is the dependency list built (from config file, package.json, function node imports?)
    • CommonJS vs ES6 modules, can we use either?
  • how to purge an old dependency
    • delete any reference will stop it from being loaded, but remains installed unless you clean out node_modules?
    • it is safe to delete node_modules?
  • how to specify a new dependency including version (precise syntax), or does it every time always try to get the latest?
  • Can we edit package.json? Or is that always generated? Must changes be in .config.modules.json,?

And hints as well, on how to make a module available globally in all function nodes. This seems the best approach, but it took me quite awhile to figure it out. Other people may also be as dense as I am:

  • create a function node that runs on startup that imports a module
  • the code within the function node then adds it to global
@jpravetz jpravetz changed the title Editing package.json dependencies does not stop old dependencies from coming back Clarify use and lifecycle of modules imports Jun 8, 2024
Copy link

github-actions bot commented Jul 9, 2024

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

1 participant