Skip to content
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

[PI branch] Unexpected token import #3

Open
goRaspy opened this issue May 5, 2018 · 1 comment
Open

[PI branch] Unexpected token import #3

goRaspy opened this issue May 5, 2018 · 1 comment

Comments

@goRaspy
Copy link

goRaspy commented May 5, 2018

Hi,

I tried to deploy your (awesome) proof of concept on a Pi 3 with raspian but when I run npm start I get a problem with the js import method.

Please let me know how to solve this issue.

Many thanks

SyntaxError: Unexpected token import
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)

@mrbig
Copy link

mrbig commented Nov 16, 2019

@goRaspy you should use at least nodejs 12, and run with the --experimental-modules flag.

Also some of the examples seem to be outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants