Closed mira-kine closed 4 weeks ago
Hi @mira-kine ! This looks all good. I wrote some comments/questions - take a look!
Aside from that, just merge the main branch into your branch and resolve the merge conflicts, then see if it starts up ok in your environment.
app starts up just fine btw!
@mira-kine It looks like eslint-plugin-prettier got installed at the root of the project, creating a package.json, package-lock.json, and node_modules folder. Maybe you accidentally npm installed at the root instead of the /app directory?
There are also acouple eslint disables comments. Can these be resolved? I'd like to avoid putting these in the codebase as much as possible.
Closes #588
What changes did you make?
check-node-version.mjs
. If the minimum node version is not met, the installation will fail and a console log error will show up requiring the current node version to be satisfied.Rationale behind the changes?
esModuleInterop
intsconfig.json
as "true": EsNext module does not currently have a way to support package.json exports, which was necessary for my pre-install check filecheck-node-version.mjs
. To make the least amount of changes, I chose to set esModuleInterop to true and change the file extension to mjs in order for the json import to work. I also used Node'screateRequire
to mimic CommonJS "require" statement, which allows package.json imports.Testing done for these changes
"node": ">=50.0.0"
and ran npm i to see if I would receive the expected errorWhat did you learn or can share that is new?(optional)
moduleResolution
tonodenext
instead as a typescript compiler option, as NodeNext makes CJS and ESM coexistable, where as simpleNode
is meant only for cjs. Since we are using ESM however, the clash of interests made the package.json import harder than expected. I also could have used ts-node but I didn't want to keep adding dependencies for only one file.Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals after changes are applied, testing node minimum version
![image](https://github.com/hackforla/HomeUniteUs/assets/90009901/a5d82a15-50bd-45f6-8e97-aa967bc4aeae)