itconsultis / prestashop-api-client

Javascript PrestaShop API client
MIT License
19 stars 11 forks source link

SyntaxError: Unexpected token import #3

Open gustawdaniel opened 6 years ago

gustawdaniel commented 6 years ago

I pasted code from README do app.js and run by

node app.js

I obtained the following error:

app.js:1
(function (exports, require, module, __filename, __dirname) { import { rest } from 'prestashop-api-client';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:599:28)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Node version: v8.9.1 Npm version: 5.5.1 System: Ubuntu 16.04

gbelvedere commented 4 years ago

did you solved this?