{"action":"created","issue":{"url":"https://api.github.com/repos/substance/texture/issues/624","repository_url":"https://api.github.com/repos/substance/texture","labels_url":"https://api.github.com/repos/substance/texture/issues/624/labels{/name}","comments_url":"https://api.github.com/repos/substance/texture/issues/624/comments","events_url":"https://api.github.com/repos/substance/texture/issues/624/events","html_url":"https://github.com/substance/texture/issues/624","id":343430276,"node_id":"MDU6SXNzdWUzNDM0MzAyNzY=","number":624,"title":"Is it possible to import and use node.js modules?","user":{"login":"meinbrodt","id":18439455,"node_id":"MDQ6VXNlcjE4NDM5NDU1","avatar_url":"https://avatars2.githubusercontent.com/u/18439455?v=4","gravatar_id":"","url":"https://api.github.com/users/meinbrodt","html_url":"https://github.com/meinbrodt","followers_url":"https://api.github.com/users/meinbrodt/followers","following_url":"https://api.github.com/users/meinbrodt/following{/other_user}","gists_url":"https://api.github.com/users/meinbrodt/gists{/gist_id}","starred_url":"https://api.github.com/users/meinbrodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meinbrodt/subscriptions","organizations_url":"https://api.github.com/users/meinbrodt/orgs","repos_url":"https://api.github.com/users/meinbrodt/repos","events_url":"https://api.github.com/users/meinbrodt/events{/privacy}","received_events_url":"https://api.github.com/users/meinbrodt/received_events","type":"User","site_admin":false},"labels":[{"id":359950411,"node_id":"MDU6TGFiZWwzNTk5NTA0MTE=","url":"https://api.github.com/repos/substance/texture/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-22T19:04:32Z","updated_at":"2018-07-24T10:42:28Z","closed_at":null,"author_association":"COLLABORATOR","body":"Hi, \r\n\r\nI wanted to import an external node.js module while tinkering a little bit with texture using \r\n\r\n```\r\nconst <moduleName> = require('<pathToModule>')\r\n```\r\n\r\nRunning `node start` builds the web based texture version without any errors,  however, when I open the page on localhost I always get a `Uncaught ReferenceError: require is not defined` at the exact position in the code where I inserted the require statement. \r\n\r\nAny help on how to solve this problem would be highly appreciated. \r\n\r\nThanks and regards, Matthias\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/substance/texture/issues/comments/407362406","html_url":"https://github.com/substance/texture/issues/624#issuecomment-407362406","issue_url":"https://api.github.com/repos/substance/texture/issues/624","id":407362406,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzM2MjQwNg==","user":{"login":"michael","id":2931,"node_id":"MDQ6VXNlcjI5MzE=","avatar_url":"https://avatars1.githubusercontent.com/u/2931?v=4","gravatar_id":"","url":"https://api.github.com/users/michael","html_url":"https://github.com/michael","followers_url":"https://api.github.com/users/michael/followers","following_url":"https://api.github.com/users/michael/following{/other_user}","gists_url":"https://api.github.com/users/michael/gists{/gist_id}","starred_url":"https://api.github.com/users/michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael/subscriptions","organizations_url":"https://api.github.com/users/michael/orgs","repos_url":"https://api.github.com/users/michael/repos","events_url":"https://api.github.com/users/michael/events{/privacy}","received_events_url":"https://api.github.com/users/michael/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T10:42:28Z","updated_at":"2018-07-24T10:42:28Z","author_association":"MEMBER","body":"We use ES-NEXT style imports in all client-code. So this would translate to:\r\n\r\n```js\r\nimport moduleName from './moduleName'\r\n```"}}
{"actor":{"display_login":"michael"}}