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 import when starting with --interpreter node<10 #4686
Comments
Use pm2 3.x
|
So the only solution to launch process with node<10 is to stay on an old pm2 version? |
I've just installed PM2 4.4.0 and I have this issue too. launching with this seem to work fine: |
Looks like I was using the wrong nodejs version on the |
thanks!node9.0.0+pm2v3.5.0 are well matched,and it would be better if you could provide a matching list on the homepage! |
What's going wrong?
This is a follow-up issue after #4588. It seems that the issue didn't address this use case and that's why I created a new one.
I'm using node@10.8.0 to launch pm2. When starting a project which requires older node version 6.9.4, pm2 fails.
I'm starting with command:
pm2 start index.js --interpreter ~/.nvm/versions/node/v6.9.4/bin/node
. Process starts but goes to errored state immediately, logs show the following error:How could we reproduce this issue?
Using an absolute path for the interpreter had same effect.
This was also reproduced with
pm2 start index.js --interpreter ~/.nvm/versions/node/v8.12.0/bin/node
. I suspect it happens with all node versions under 10 based on the other issue comments.Supporting information
The text was updated successfully, but these errors were encountered: