-
Notifications
You must be signed in to change notification settings - Fork 2
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
SyntaxError: Unexpected token 'export' #1
Comments
Thanks for raising an issue |
I have been testing the starter kit , I am using the normal nx starter using the nx command line same config file but, it does not make any problems. for you to be able to solve such a problem i will give you an understanding of how this command line works cause i think the problem is related to the the build command first runs the following command
Then this was the build step if you made the runAndBuild to true it will run this command
if you test this same command you will find the same error happening to you there is something about the tsconfig but i don't know what it is exactly after fixing it i find other errors so I think you might want to try that and share with me here and we can collaborate on solving it. Hope this helps in resolving the issue. |
@abdoolly I suspect you are using a far newer version of NodeJS. I am using v12.16.1 and have all the latest dependencies. I can confirm that in this environment I am experiencing the same issue as @xmlking. Following the recommendations in this ts-node issue is the closest I have come to resolving this, but as yet still cannot get ts-node-builder to work. |
Hello @ashbrener I think the problem is not in the node version since my node version is v12.13.0
Note: when I tried to change the "module" to something other than commonjs an error happened similar to what happened with you but, it was complaining about the import statement.
so, the tsconfig file module change should solve the problem for you I hope so. |
I made those changes, now I get:
|
I have similar problems with latest version of NX, which use |
I was getting the same error as the OP, the fix for me was to specify the double --require flag as suggested by abdoolly above: node --require "tsconfig-paths/register" --require "ts-node/register" "./dist/packages/server/src/main.js" |
I am getting error, while trying to use with https://github.com/xmlking/ngx-starter-kit
The text was updated successfully, but these errors were encountered: