Hi @Petter_Emil_Anderssen - The relationship between Packs and Node is a little strange, but essentially:
- Packs run on a custom JavaScript runtime that supports the ECMAScript standard and a few extra libraries that are bolted on. It is not a Node runtime.
- When developing a Pack locally, Node can be used to run the code locally for testing.
- When developing a Pack locally, the Coda CLI (which runs in Node) is used to compile the source files into a single bundle.
I’m not entirely sure at which stage you were running into the issue, but the short answer to your question is that you can’t tell Coda to build or run your Pack with a specific Node version, because it doesn’t build your Pack (you build it locally) and it doesn’t run on Node. The version of Node used to build and run it locally is determined by the version of Node you have installed.
It is the case that many NPM libraries are not compatible with the Packs runtime, specifically because they are looking for Node features that aren’t available. You can read more about compatibility here:
Ah, I see!
Thank you so much for taking the time to explain this to me
1 Like