{"action":"created","issue":{"url":"https://api.github.com/repos/nestjs/nest/issues/883","repository_url":"https://api.github.com/repos/nestjs/nest","labels_url":"https://api.github.com/repos/nestjs/nest/issues/883/labels{/name}","comments_url":"https://api.github.com/repos/nestjs/nest/issues/883/comments","events_url":"https://api.github.com/repos/nestjs/nest/issues/883/events","html_url":"https://github.com/nestjs/nest/issues/883","id":341751322,"node_id":"MDU6SXNzdWUzNDE3NTEzMjI=","number":883,"title":"VSCode debug: can not find module","user":{"login":"FourLeafClover","id":8449788,"node_id":"MDQ6VXNlcjg0NDk3ODg=","avatar_url":"https://avatars1.githubusercontent.com/u/8449788?v=4","gravatar_id":"","url":"https://api.github.com/users/FourLeafClover","html_url":"https://github.com/FourLeafClover","followers_url":"https://api.github.com/users/FourLeafClover/followers","following_url":"https://api.github.com/users/FourLeafClover/following{/other_user}","gists_url":"https://api.github.com/users/FourLeafClover/gists{/gist_id}","starred_url":"https://api.github.com/users/FourLeafClover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FourLeafClover/subscriptions","organizations_url":"https://api.github.com/users/FourLeafClover/orgs","repos_url":"https://api.github.com/users/FourLeafClover/repos","events_url":"https://api.github.com/users/FourLeafClover/events{/privacy}","received_events_url":"https://api.github.com/users/FourLeafClover/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-17T03:20:03Z","updated_at":"2018-07-18T10:16:39Z","closed_at":null,"author_association":"NONE","body":"npm run start is ok and can also run the project。 but when i debug the error console show me can not find module。\r\n\r\nNote：if i use import {AppModule} from './app.module'   it will be ok. but when  import {AppModule} from 'app.module'(just like the blow pictures). it will tell me that cannot find the app.module.\r\n\r\n![image](https://user-images.githubusercontent.com/8449788/42799341-17397be6-89ca-11e8-8b7d-7b049dabe916.png)\r\n\r\n![image](https://user-images.githubusercontent.com/8449788/42794724-fdc552f0-89b2-11e8-809a-bbe5b767e4fd.png)\r\n\r\nthis is my lanch.json\r\n\r\n{\r\n  // 使用 IntelliSense 了解相关属性。 \r\n  // 悬停以查看现有属性的描述。\r\n  // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid=830387\r\n  \"version\": \"0.2.0\",\r\n  \"configurations\": [\r\n    {\r\n      \"type\": \"node\",\r\n      \"request\": \"launch\",\r\n      \"name\": \"启动程序\",\r\n      \"protocol\": \"inspector\",\r\n      \"sourceMaps\": true,\r\n      \"stopOnEntry\": true,\r\n      \"console\": \"internalConsole\",\r\n      \"program\": \"${workspaceFolder}\\\\src\\\\main.ts\",\r\n      \"preLaunchTask\": \"tsc: build - tsconfig.json\",\r\n      \"outFiles\": [\r\n        \"${workspaceFolder}/dist/**/*.js\"\r\n      ]\r\n    }\r\n  ]\r\n}"},"comment":{"url":"https://api.github.com/repos/nestjs/nest/issues/comments/405883050","html_url":"https://github.com/nestjs/nest/issues/883#issuecomment-405883050","issue_url":"https://api.github.com/repos/nestjs/nest/issues/883","id":405883050,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTg4MzA1MA==","user":{"login":"BrunnerLivio","id":9899423,"node_id":"MDQ6VXNlcjk4OTk0MjM=","avatar_url":"https://avatars2.githubusercontent.com/u/9899423?v=4","gravatar_id":"","url":"https://api.github.com/users/BrunnerLivio","html_url":"https://github.com/BrunnerLivio","followers_url":"https://api.github.com/users/BrunnerLivio/followers","following_url":"https://api.github.com/users/BrunnerLivio/following{/other_user}","gists_url":"https://api.github.com/users/BrunnerLivio/gists{/gist_id}","starred_url":"https://api.github.com/users/BrunnerLivio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrunnerLivio/subscriptions","organizations_url":"https://api.github.com/users/BrunnerLivio/orgs","repos_url":"https://api.github.com/users/BrunnerLivio/repos","events_url":"https://api.github.com/users/BrunnerLivio/events{/privacy}","received_events_url":"https://api.github.com/users/BrunnerLivio/received_events","type":"User","site_admin":false},"created_at":"2018-07-18T10:16:39Z","updated_at":"2018-07-18T10:16:39Z","author_association":"NONE","body":"@FourLeafClover \r\nCan you close this issue? This is not Nest related.\r\n\r\n---\r\n\r\nIn general you use inside the application relative imports e.g. `import * form './app.module'`. In TypeScript, if you use non-relative imports e.g. `import * from 'jquery'`, it looks up inside your `node_modules` folder. \r\n\r\nThe approach from frameworks like nest, angular or vue with the `@`-prefix is a different story. `@`-prefix means the packages are scoped. [Read more here](https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages). I would only use this, if I want to make complicated modular software. It is quite hard to setup the architecture for scoped packages.\r\n\r\nIf you do not like to write a lot of `../../` you can still use [TypeScript path aliases](https://medium.com/@caludio/how-to-use-module-path-aliases-in-visual-studio-typescript-and-javascript-e7851df8eeaa).\r\n\r\nAlso check out the [TypeScript module resolution](https://www.typescriptlang.org/docs/handbook/module-resolution.html)\r\n\r\n"}}
{"actor":{"display_login":"BrunnerLivio"}}