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

Node 16: Fix bug with mold-source-map dependency #51

Open
alykat opened this issue Nov 2, 2021 · 3 comments
Open

Node 16: Fix bug with mold-source-map dependency #51

alykat opened this issue Nov 2, 2021 · 3 comments

Comments

@alykat
Copy link
Member

alykat commented Nov 2, 2021

Noting this here in case it comes up later:

For folks running Node v16, the dailygraphics-next rig might throw an error with the node module mold-source-map complaining about an invalid "main" parameter.

First, delete and try to reinstall the module, in your local dailygraphics-next/node_modules/ folder. (When we tried this today, it didn't work b/c the developer hadn't fixed it on their end.)

If that doesn't work, go into package.json and change
"main": "mold-source-map.js"
to
"main": "index.js"

@thomaswilburn
Copy link
Contributor

I did a little research on this today, and in a fresh copy of the rig it looks like the thing that's pulling this in is a part of our Browserify JS bundling chain (specifically, it's the exorcist module for extracting source maps). I thought it was also googleapis, but if it is, they don't use it anymore. (You can run npm ls mold-source-map to see its dependency chain).

Ultimately, we have needed to update the bundler for a while. It works fine, it's not particularly fast but Browserify was easy to extend and I had a lot of experience with it. I think it may be possible to move to Rollup, and I'm going to take a look at that this summer while school systems are on break (and my workload gets lighter in response). If I figure anything out that matches the slightly odd requirements of the rig (needs to be able to load NPM dependencies from a different location than where the code is running, and ideally can work from/to in-memory JS), I'll file a pull request from our version.

@thomaswilburn
Copy link
Contributor

I've merged the code over after testing for a while on our fork of the rig. I know y'all have a branch going for this as well--it may also be worth cherrypicking our changes over from the interactive template, where I've made the same changes, and also moved to the latest AWS SDK (this should also be done for DG-Next at some point, and it might clear up the signature errors you all have seen, but I don't know that for sure).

@alykat
Copy link
Member Author

alykat commented Jul 14, 2022

Addressed in c77c462. Keeping this open for now to see if we run into this issue the next time we onboard someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants