handle node 6 gracefully #2308
Description
Bug Report
After upgrading to prisma 1.7.3 and applying the new prisma.yml structure >>
removing keys: service, stage, cluster
adding key: endpoint
Using node-v6.11.1
Getting this Error:
TypeError: url_1.URL is not a constructor
Stack trace:
at parseEndpoint (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/src/PrismaDefinition.ts:405:15) at PrismaDefinitionClass.get [as service] (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/src/PrismaDefinition.ts:108:13) at PrismaDefinitionClass.validate (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/src/PrismaDefinition.ts:148:14) at PrismaDefinitionClass.<anonymous> (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/src/PrismaDefinition.ts:78:12) at step (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/PrismaDefinition.js:32:23) at Object.next (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/PrismaDefinition.js:13:53) at fulfilled (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/PrismaDefinition.js:4:58)
When downgrading to V1.6.3
npm i -g [email protected]
and restoring the prisma.yml old format (with cluster and service definitions and without the endpoint: url), I can deploy again.
Upgraded again to prisma 1.7.3 and maintained the keys:
service, stage, cluster + endpoint key,
I can deploy again (using the new V)