-
Notifications
You must be signed in to change notification settings - Fork 8
Description
First of all, thanks for a very good library!
I have spent more than 5 hours trying to upgrade my typescript node project to work after the changes between version 3 and 4, and have at this moment given up and rolled back to version 3.
The error given when running the program is:
SyntaxError: Cannot use import statement outside a module:
The error happens in:
/node_modules/chord-symbol/src/index.js:1
import './typedefs';
^^^^^^
SyntaxError: Cannot use import statement outside a module
I tried following several tutorials to see if setting typescript compiling to esnext and setting type to "module" in package.json would work but had to give up after hours of errors.
I also tried to see if it was only the first import line that stopped this from working, but then it fails on the second import in the same index.js file, so for some reasons all "imports" have stopped working.
I'm noe sure what changed between version 3 and 4 that made a standard typescript node project stop working, but I can confirm that chord-symbol version 4 works perfectly in react native expo.
Here are some tutorials I tried, but none of them helped.
https://stackoverflow.com/questions/71929951/typescript-syntaxerror-cannot-use-import-statement-outside-a-module-side-file
https://stackoverflow.com/questions/74766930/syntaxerror-cannot-use-import-statement-outside-a-module-in-nodejs-typescript