Skip to content
This repository has been archived by the owner on Aug 11, 2019. It is now read-only.

Node version 6 required #4

Closed
antstanley opened this issue Nov 30, 2016 · 5 comments
Closed

Node version 6 required #4

antstanley opened this issue Nov 30, 2016 · 5 comments

Comments

@antstanley
Copy link

More a head's up, but the CLI fails if you're using node v4.6 with error below... upgrading to node v6.9.1 solved this for me..

Error below on v4.6

`/home/ubuntu/workspace/node_modules/svelte-cli/bin.js:607
const { sourceMap } = options;
^

SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3`

@pwittchen
Copy link

pwittchen commented Dec 1, 2016

I had exactly the same problem on macOS and solved it by upgrade of the node.js as well. I used this instruction: https://solarianprogrammer.com/2016/04/29/how-to-upgrade-nodejs-mac-os-x/. On node v. 7.2.0 it works fine, but v. 4.6. throws errors as @antstanley reported. This tool should print more friendly error for the user. I see that there's a PR for that now.

@Poetro
Copy link

Poetro commented Dec 2, 2016

Also package.json does not say anything about required Node.js version, although it should. Or maybe it should be compiled to ES5 / CJS during build.

@Ryuno-Ki
Copy link

Ryuno-Ki commented Dec 2, 2016

An engines entry is needed for this.

@Rich-Harris
Copy link
Member

Related: sveltejs/svelte#109

@antstanley
Copy link
Author

I notice the engines entry in package.json has been updated. Will close this now.

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

No branches or pull requests

5 participants