parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.91k stars 4.78k forks source link

Add Node 17 support #7686

Closed malcolm-dane closed 2 years ago

malcolm-dane commented 2 years ago

New Issue Checklist

Issue Description

The dependency as it lists anything greater than I think 4. If using heroku it defaults to NodeJs v17.1.0. This crashes the app and causes it not to run. Changing it to "node": "14.18.1" will make it run.

Steps to reproduce

Load Parse locally using NodeJS 17.1.0, or load this repo into heroku and attach a mongoatlas and watch it crash.

Actual Outcome

The app crashes after build.

Expected Outcome

For the parse server to be up and running.

Environment

Heroku and locally if using 17.1 will result in a huge list of errors about exporting packages.

Server

Database Has nothing to do with it.

Client Has nothing to do with it. Builds properly after change. Tested REST api and saved to my MongoAtlas.

Logs

2021-11-10T01:59:39.914107+00:00 heroku[web.1]: Starting process with command npm start

2021-11-10T01:59:41.044285+00:00 app[web.1]:

2021-11-10T01:59:41.044303+00:00 app[web.1]: > parse-server-example@1.4.0 start

2021-11-10T01:59:41.044303+00:00 app[web.1]: > node index.js

2021-11-10T01:59:41.044304+00:00 app[web.1]:

2021-11-10T01:59:42.516409+00:00 app[web.1]: node:internal/modules/cjs/loader:488

2021-11-10T01:59:42.516440+00:00 app[web.1]: throw e;

2021-11-10T01:59:42.516440+00:00 app[web.1]: ^

2021-11-10T01:59:42.516441+00:00 app[web.1]:

2021-11-10T01:59:42.516442+00:00 app[web.1]: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/extractFiles' is not defined by "exports" in /app/node_modules/extract-files/package.json

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this issue!

mtrezza commented 2 years ago

Parse Server is not even Node 16 compatible yet, see https://github.com/parse-community/parse-server/issues/7669. Presumably, Node 16 compatibility needs to be established first, before looking at Node 17 compatibility.

malcolm-dane commented 2 years ago

In the Parse-Server example, which is linked through numerous places, including Heroku's guide, Parse-Server Heroku setup guide the default is greater than 4.x.x. Heroku sees that and thinkss ok node 17.x.x it is. If you look through various stack exchange, reddit threads you see alot of people having issues with it. I've tried a few different times to get it up, but didn't have the time or reason to troubleshoot it. Maybe add it to the documentation is my only suggestion. I don't know, I just wanted to bring it up! Sorry if I keep spamming this.

mtrezza commented 2 years ago

Good point, we should change the version range. I'll open a PR for this.

malcolm-dane commented 2 years ago

Sounds good, this will def help some people. This is the first time I've ever actually reported a bug, glitch,etc. :)

mtrezza commented 2 years ago

Well done! If you want to go to the next level, you could look for an open issue here (or in parse-dashboard) and provide a pull request to fix it.

I reopened this because the issue of missing Node 17 compatibility is not solved.