parse-server-api-mail-adapter
parse-server-api-mail-adapter copied to clipboard
New Install required regenerator-runtime which is not in configuration or installation readme
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest version.
Issue Description
Going through the installation instructions from the README file, I get an error
ReferenceError: regeneratorRuntime is not defined
Which can be solved by requiring regenerator-runtime.
A quick update to the readme file requiring and installing regenerator-runtime fixes this.
Steps to reproduce
New installation on a clean parse-server will produce this issue.
Actual Outcome
error ReferenceError: regeneratorRuntime is not defined
Expected Outcome
ReadMe should mention the requirement for regenerator-runtime for people not as tech savvy like I am.
Failing Test Case / Pull Request
Environment
- API Mail Adapter version:
6.0.1
- Parse Server version:
5.2.1
Logs
Thanks for opening this issue!
- 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
Which version of the mail adapter are you using? There is no version 6.x.
Were you able to track down what exactly causes the error, or which part of the adapter requires that dependency?
What is the dependency called, what did you add to your package.json
?
Which version of the mail adapter are you using? There is no version 6.x.
Were you able to track down what exactly causes the error, or which part of the adapter requires that dependency? What is the dependency called, what did you add to your
package.json
?
sorry, It's version 2.1.0
this is the exact error I get.
ReferenceError: regeneratorRuntime is not defined
at /Users/jayson/Projects/heroku/node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:155:56
at /Users/jayson/Projects/heroku/node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:192:6
at Object.<anonymous> (/Users/jayson/Projects/heroku/node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:778:2)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/jayson/Projects/heroku/node_modules/parse-server-api-mail-adapter/lib/index.js:26:46)
dependencies in package.json
"parse-server-api-mail-adapter": "^2.1.0",
"regenerator-runtime": "^0.13.9",
I hope that helps. I didn't look into ApiMailAdapter.js yet as installing the regenaratorRuntime in package.json and requiring it in my app.js worked for me.
It seems that the polyfill that babel generated requires runtime, which Node version did you run this on? Not sure I would add runtime like that, you probably don't know which version babel expected, so you may run into issues.
Maybe helpful for further investigation: https://stackoverflow.com/a/56754212/1870795
It seems that the polyfill that babel generated requires runtime, which Node version did you run this on? Not sure I would add runtime like that, you probably don't know which version babel expected, so you may run into issues.
Maybe helpful for further investigation: https://stackoverflow.com/a/56754212/1870795
i have v16.15.0 running.
So you don't encounter this problem with a new install on your end @mtrezza ?
We have a CI that tests with Node 16 and tests pass. Do you still see this issue in the latest version?
I just ran into this issue here:
Solution/Workaround
yarn add regenerator-runtime
in index.ts (or where ever):
import 'regenerator-runtime';
@penchef Which Node version are you using?
It's not clear at this point what requires regeneratorRuntime
, it would be great to get some more info.
maybe this helps:
I only ran into this when I was running tests. This is the stack trace of the error:
ReferenceError: regeneratorRuntime is not defined
› node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:155:56
› node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:192:6
› Object.<anonymous> (node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:778:2)
› require.extensions.<computed> (node_modules/ts-node/src/index.ts:1286:43)
Node: v18.14.2 "parse": "4.0.1", "parse-server": "6.0.0", "parse-server-api-mail-adapter": "^2.2.0", "ts-node": "^10.0.0", "ts-node-dev": "^1.1.8", "typescript": "^4.6.3"
What do you see at node_modules/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:155:56?
We have a CI that tests with Node 16 and tests pass. Do you still see this issue in the latest version?
I have just commented out the regeneratorRuntime dependency in my package.json and so far it seems to be working fine.
Hi, After updating the parse server to 7.2.0 I'm getting this error too. Here is the full error log:
/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:133
var _sendMail2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(_ref4) {
^
ReferenceError: regeneratorRuntime is not defined
at /parse-server-api-mail-adapter/lib/ApiMailAdapter.js:133:56
at /parse-server-api-mail-adapter/lib/ApiMailAdapter.js:166:6
at Object.<anonymous> (/parse-server-api-mail-adapter/lib/ApiMailAdapter.js:675:2)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (/parse-server-api-mail-adapter/lib/index.js:25:46)
Node.js v20.9.0
Maybe this: https://github.com/parcel-bundler/parcel/issues/1762#issuecomment-722558104, or remove babel altogether from this repo.
Could you please try out version 4.0.0? It rebuilds the package-lock file, so maybe it fixed this issue.
Could you please try out version 4.0.0? It rebuilds the package-lock file, so maybe it fixed this issue.
Can confirm, 4.0.0 is working great, thanks!
Closed via https://github.com/parse-community/parse-server-api-mail-adapter/pull/94