{"action":"created","issue":{"url":"https://api.github.com/repos/prisma/prisma/issues/3601","repository_url":"https://api.github.com/repos/prisma/prisma","labels_url":"https://api.github.com/repos/prisma/prisma/issues/3601/labels{/name}","comments_url":"https://api.github.com/repos/prisma/prisma/issues/3601/comments","events_url":"https://api.github.com/repos/prisma/prisma/issues/3601/events","html_url":"https://github.com/prisma/prisma/issues/3601","id":384454247,"node_id":"MDU6SXNzdWUzODQ0NTQyNDc=","number":3601,"title":"Error: only absolute urls are supported","user":{"login":"plxel","id":1496959,"node_id":"MDQ6VXNlcjE0OTY5NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1496959?v=4","gravatar_id":"","url":"https://api.github.com/users/plxel","html_url":"https://github.com/plxel","followers_url":"https://api.github.com/users/plxel/followers","following_url":"https://api.github.com/users/plxel/following{/other_user}","gists_url":"https://api.github.com/users/plxel/gists{/gist_id}","starred_url":"https://api.github.com/users/plxel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plxel/subscriptions","organizations_url":"https://api.github.com/users/plxel/orgs","repos_url":"https://api.github.com/users/plxel/repos","events_url":"https://api.github.com/users/plxel/events{/privacy}","received_events_url":"https://api.github.com/users/plxel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-26T18:24:15Z","updated_at":"2018-11-26T18:47:10Z","closed_at":"2018-11-26T18:47:10Z","author_association":"NONE","body":"I have created simple app using typescript prisma client\r\nWhen executing simple query to receive users list in graphql playground, result contains errros array with\r\nerror \"only absolute urls are supported\". It occurs in node-fetch, but i analyzed trace and found that some package call fetch with url = undefined.\r\n\r\nThen I add console.log to generated prisma-client/index.js:\r\n```\r\nconsole.log(`${process.env[\"PRISMA_ENDPOINT\"]}`);\r\nexports.Prisma = prisma_lib_1.makePrismaClientClass({\r\n  typeDefs,\r\n  models,\r\n  endpoint: `${process.env[\"PRISMA_ENDPOINT\"]}`\r\n});\r\n```\r\nAnd when code starts value of process.env[\"PRISMA_ENDPOINT\"] is undefined\r\n\r\nI used command: `nodemon --exec ts-node src/index.js`\r\n\r\nand in src/index.js code starts with:\r\n```\r\nimport dotenv from \"dotenv\";\r\ndotenv.config();\r\nimport createServer from \"./createServer\";\r\n```\r\nand in createServer:\r\n```\r\nimport { prisma } from \"./generated/prisma-client\";\r\n```\r\n\r\nSo if I use regular require instead of ES6 imports and run code without ts-node or babel-node no error occurs and  process.env[\"PRISMA_ENDPOINT\"] is always has value\r\n\r\nCan anybody explain why it is happening? \r\nAs I understand this happenning because when ts compiles code it runs without env loaded using dotenv and then runs compiled code which already set endpoint to undefined\r\n\r\nWhat is correct way to fix it?\r\n\r\n**Versions (please complete the following information):**\r\n - OS: `Windows 10`\r\n - node: 8.11.3\r\n - \"graphql\": \"^0.13.2\",\r\n - \"graphql-yoga\": \"^1.16.7\",\r\n - \"prisma\": \"^1.21.0\",\r\n - \"prisma-client-lib\": \"^1.21.0\"\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/prisma/prisma/issues/comments/441752022","html_url":"https://github.com/prisma/prisma/issues/3601#issuecomment-441752022","issue_url":"https://api.github.com/repos/prisma/prisma/issues/3601","id":441752022,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTc1MjAyMg==","user":{"login":"plxel","id":1496959,"node_id":"MDQ6VXNlcjE0OTY5NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1496959?v=4","gravatar_id":"","url":"https://api.github.com/users/plxel","html_url":"https://github.com/plxel","followers_url":"https://api.github.com/users/plxel/followers","following_url":"https://api.github.com/users/plxel/following{/other_user}","gists_url":"https://api.github.com/users/plxel/gists{/gist_id}","starred_url":"https://api.github.com/users/plxel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plxel/subscriptions","organizations_url":"https://api.github.com/users/plxel/orgs","repos_url":"https://api.github.com/users/plxel/repos","events_url":"https://api.github.com/users/plxel/events{/privacy}","received_events_url":"https://api.github.com/users/plxel/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T18:47:10Z","updated_at":"2018-11-26T18:47:10Z","author_association":"NONE","body":"for some reason can't reproduce it again\r\n"}}
{"actor":{"display_login":"plxel"}}