-
Notifications
You must be signed in to change notification settings - Fork 38
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
Editing emoji file #48
Comments
What command you used to compile? The error should only happen when running untranspiled code. babel default preset should transpile the es6 module to require. You could also manually specify the preset.
|
I already fixed it with preset-env. But then there are syntax errors in index.js like "concat" function missing and I realized it was using a concat on an object instead of an array. Commented that out and fixed a few other stuff in the code to get that working. But I have a feeling the index.js inside emoji-data may not be the latest one. Can you please confirm? |
I followed the same steps but looks like the |
From my notes it seems I fixed it by the following changes: Use @babel/preset-env In index.js comment out the following:
Then run |
Hi,
The documentation just states to edit the file and compile using this command.
npx babel-node scripts/compile.js
I installed @babel/node and @babel/core first. In node 10 as well as 12 it didn't work. On node 10 it says "SyntaxError: Unexpected token import" and on node 12 its "SyntaxError: Cannot use import statement outside a module". Is it possible for someone to provide some help on how to get this compiled?
The text was updated successfully, but these errors were encountered: