aheissenberger / serverless-appsync-offline

Serverless AWS AppSync Offline Plugin - Allow to run AppSync locally for serverless framework
MIT License
90 stars 25 forks source link

initialization errored: Unexpected token export #11

Closed danifbento closed 5 years ago

danifbento commented 5 years ago

Hello,

I'm trying to run serverless-appsync-offline but I'm getting the following error:

"Serverless plugin "serverless-appsync-offline" initialization errored: Unexpected token export"

I already updated nodejs to v11.6.0 version and npm to 6.5.0-next.0

Do you have any idea why this is happening?

danifbento commented 5 years ago

I found that running a npm install && npm run prepare inside graphql-phone-type it stops giving this error...

timgivois commented 5 years ago

can you give more context?

austin43 commented 5 years ago

@danifbento @timgivois we are running into the same issue using the pnpm packager. Running npm install in the package directory at least gets us past this error.

cd node_modules/serverless-appsync-offline;
npm install;

It seems when using pnpm, we run into an issue during install of this package because prepare fails for graphql-phone-type:

ERROR  graphql-phone-type@0.0.2 prepare: `npm run clean && npm run lint && npm run build`
Exit status 1