Skip to content

--harmony_modules isn't working? #2760

Description

@tusharmath

Following the documentation given here https://nodejs.org/en/docs/es6/

Sample Code

import {partial} from 'lodash'
console.log(partial)

command

node --harmony_modules  Javascript.js
/Users/tushar.mathur/Documents/Projects/temp/Javascript.js:1
(function (exports, require, module, __filename, __dirname) { import {partial} from 'lodash'
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:413:25)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:475:10)
    at startup (node.js:117:18)
    at node.js:951:3
➜  temp

OS: Mac OS 10.10.4
Node: 4.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions