Error when running micro -p 5000 pictures.js

1

When I execute the command: micro -p 5000 pictures.js

I get the following error ...

  

import {send, json} from 'micro' ^^^^^^ SyntaxError: Unexpected   import token

     

(Note: micro ":" ^ 6.0.2 ", node: v6.9.1)

How can I solve this?

    
asked by frandipfer 01.11.2016 в 23:54
source

1 answer

1

In order for it to work, try the [email protected] version.

  • Delete the global micro version:

    $ sudo npm uninstall -g micro
    
  • Install the global version again:

    $ sudo npm install -g [email protected]
    
  • Delete the node_modules folder of the project and then install micro in the project:

    $sudo npm install --save [email protected]
    
  • answered by 02.11.2016 / 05:46
    source