Unexpected identifier error
Closed this issue · 3 comments
pedrowindisch commented
pedrowindisch commented
Ok, I got it. The template supports ES6 modules, but the express-artisan package doesn't.
To fix that, my solution was to add the esm package and use it on the express-artisan module, like this:
// node_modules/express-artisan/index.js
[...]
require = require('esm')(module);
require('./expressArtisan');
The ESM package will allow every Node.js version to support ES6 modules, including those who don't support them natively (<13.12.0).
Everything's working perfectly now. I tested it with the other templates and they're working fine. If you want, I can make a PR with my fix, but I don't know if this is a general issue or if this is happening only on my PC.
getspooky commented
Hi @pedrowindisch
The bug is fixed
pedrowindisch commented
Thanks @getspooky! Everything's working as expected now 👍