My boss want me to start a node server on aws ec2 instance.
- I tested locally, it starts successfully
- I uploaded it on the instance.
- npm, express, babel and other libraries are installed
then I try to use pm2 to start the server, it gives me following error:
/home/ubuntu/.pm2/logs/[login to view URL] last 15 lines:
1|app | /opt/gcs/[login to view URL]
1|app | (function (exports, require, module, __filename, __dirname) { import express from 'express'
1|app | ^^^^^^
1|app |
1|app | SyntaxError: Unexpected token import
1|app | at createScript ([login to view URL]:10)
1|app | at [login to view URL] ([login to view URL]:10)
1|app | at Module._compile ([login to view URL]:28)
1|app | at Object.Module._extensions..js ([login to view URL]:10)
1|app | at [login to view URL] ([login to view URL]:32)
1|app | at tryModuleLoad ([login to view URL]:12)
1|app | at Function.Module._load ([login to view URL]:3)
1|app | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/[login to view URL]:21)
1|app | at Module._compile ([login to view URL]:30)
1|app | at Object.Module._extensions..js ([login to view URL]:10)
I did some research, it is because node js does not support the use of import statement. However, there are so many lines that use import. Some online source says use Enable ES6 imports in node js provides a solution.
I followed but still can not get the server started. Need some urgent help as I need it started in a few hours.
[login to view URL]
I know your problem, you have it in your pocket. contact me I will tell you what to do. so simple. you could use import in NodeJS so simple.
So many scammers here for this simple problem be careful. contact me.
Regards,
$80 HKD Om 1 dag
5,0 (2 omdömen)
1,6
1,6
10 frilansar lägger i genomsnitt anbud på $178 HKD för detta uppdrag
Hello, Hope you are doing well!
I am a senior system admin and AWS certified professional with over 12 years experience.
I can help you fix the issue.
Looking forward to discuss.
Best Regards
DoriginTech Team
Hi There,
I am a developer & expert in , Apache and LINUX ,Troubleshoot Apache Server Performance
Willing to work with you in your project and Highly professional for delivery and support.
so I am waiting your reply in chat so we can discuss more.
Thanks
hi there, i got your issue with AWS EC2 server, feel free to reach me for the solution of the issue. please message me get it done asap after discussing the issue in more depth.
Hi,
I am an experienced web developer having expertise in PHP, Node js, Java technologies. I have read your error log related to import in node js. I have worked in many similar projects before and hope I will be able to solve the issue/error.
I am eager to help you in this task.
Message me for further discussion.
Thanks
Hi,
we are a team of developer and designer who passionate about the web technology and we have experience of creating and hosting the MEAN and Static HTML templates.
Thanks,
FlipFlop Team