Skip to content

Unexpected token import for nodejs on GAE Flex #478

@alanma

Description

@alanma

I deployed a nodejs app on appengine flexible today. But the deployed server won't start with the following error in the logs. I'm confused why my import statement is being marked as errors. Please help! Thanks in advance.

A  /app/src/server/index.js:2
 
A  import gqlServer from './myServer';
 
A  SyntaxError: Unexpected token import
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
 
  undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions