{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic2/issues/809","labels_url":"https://api.github.com/repos/driftyco/ionic2/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic2/issues/809/comments","events_url":"https://api.github.com/repos/driftyco/ionic2/issues/809/events","html_url":"https://github.com/driftyco/ionic2/issues/809","id":123829979,"number":809,"title":"Can’t serve new TypeScript project: Problems with webpack.config","user":{"login":"DustinJSilk","id":5979984,"avatar_url":"https://avatars.githubusercontent.com/u/5979984?v=3","gravatar_id":"","url":"https://api.github.com/users/DustinJSilk","html_url":"https://github.com/DustinJSilk","followers_url":"https://api.github.com/users/DustinJSilk/followers","following_url":"https://api.github.com/users/DustinJSilk/following{/other_user}","gists_url":"https://api.github.com/users/DustinJSilk/gists{/gist_id}","starred_url":"https://api.github.com/users/DustinJSilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DustinJSilk/subscriptions","organizations_url":"https://api.github.com/users/DustinJSilk/orgs","repos_url":"https://api.github.com/users/DustinJSilk/repos","events_url":"https://api.github.com/users/DustinJSilk/events{/privacy}","received_events_url":"https://api.github.com/users/DustinJSilk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-24T19:32:46Z","updated_at":"2015-12-24T20:12:00Z","closed_at":null,"body":"Getting an error when trying to start a new TypeScript project. Tried playing around with the Webpack.config file - which mixes things up but doesn't resolve to a successful launch. A new JavaScript project works fine if I remove this line for some reason: `var webpack = require('webpack');`\r\n\r\nHeres the error I get when serving a new TypeScript project:\r\n\r\n> multi main\r\n> Module not found: Error: Cannot resolve 'file' or 'directory' /Users/[user]/Repos/ionic-app/ionicApp/app/app in /Users/[user]/Repos/ionic-app/ionicApp\r\n> resolve file\r\n/Users/[user]/Repos/ionic-app/ionicApp/app/app doesn't exist\r\n/Users/[user]/Repos/ionic-app/ionicApp/app/app.js doesn't exist\r\n/Users/[user]/Repos/ionic-app/ionicApp/app/app.ts doesn't exist\r\nresolve directory\r\n/Users/[user]/Repos/ionic-app/ionicApp/app/app doesn't exist (directory default file)\r\n/Users/[user]/Repos/ionic-app/ionicApp/app/app/package.json doesn't exist (directory description file)\r\n[/Users/[user]/Repos/ionic-app/ionicApp/app/app]\r\n[/Users/[user]/Repos/ionic-app/ionicApp/app/app.js]\r\n[/Users/[user]/Repos/ionic-app/ionicApp/app/app.ts]\r\n@ multi main (CLI v2.0.0-beta.15)\r\n\r\n> Your system information:\r\n\r\n> Cordova CLI: 5.4.1\r\nGulp version: CLI version 3.9.0\r\nGulp local:\r\nIonic Version: 2.0.0-alpha.45\r\nIonic CLI Version: 2.0.0-beta.15\r\nIonic App Lib Version: 2.0.0-beta.8\r\nios-deploy version: Not installed\r\nios-sim version: 3.1.1 \r\nOS: Mac OS X Mavericks\r\nNode Version: v4.2.3\r\nXcode version: Xcode 6.1.1 Build version 6A2008a\r\n\r\nIve tried with the latest versions of Node as well. Reinstalling just about everything on each attempt. Nothing works.\r\nHeres my webpack.config if you don't wish to download the latest one\r\n\r\n```javascript\r\nvar path = require('path');\r\n\r\n\r\nmodule.exports = {\r\n  entry: [\r\n    path.normalize('es6-shim/es6-shim.min'),\r\n    'reflect-metadata',\r\n    'web-animations.min',\r\n    path.normalize('zone.js/dist/zone-microtask'),\r\n    path.resolve('app/app')\r\n  ],\r\n  output: {\r\n    path: path.resolve('www/build/js'),\r\n    filename: 'app.bundle.js',\r\n    pathinfo: false // show module paths in the bundle, handy for debugging\r\n  },\r\n  module: {\r\n    loaders: [\r\n      {\r\n        test: /\\.ts$/,\r\n        loader: 'awesome-typescript',\r\n        query: {\r\n          'doTypeCheck': false\r\n        },\r\n        include: path.resolve('app'),\r\n        exclude: /node_modules/\r\n      },\r\n      {\r\n        test: /\\.js$/,\r\n        include: path.resolve('node_modules/angular2'),\r\n        loader: 'strip-sourcemap'\r\n      }\r\n    ],\r\n    noParse: [\r\n      /es6-shim/,\r\n      /reflect-metadata/,\r\n      /web-animations/,\r\n      /zone\\.js(\\/|\\\\)dist(\\/|\\\\)zone-microtask/\r\n    ]\r\n  },\r\n  resolve: {\r\n    alias: {\r\n      'web-animations.min': path.normalize('ionic-framework/js/web-animations.min')\r\n    },\r\n    extensions: [\"\", \".js\", \".ts\"]\r\n  }\r\n};\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic2/issues/comments/167155357","html_url":"https://github.com/driftyco/ionic2/issues/809#issuecomment-167155357","issue_url":"https://api.github.com/repos/driftyco/ionic2/issues/809","id":167155357,"user":{"login":"DustinJSilk","id":5979984,"avatar_url":"https://avatars.githubusercontent.com/u/5979984?v=3","gravatar_id":"","url":"https://api.github.com/users/DustinJSilk","html_url":"https://github.com/DustinJSilk","followers_url":"https://api.github.com/users/DustinJSilk/followers","following_url":"https://api.github.com/users/DustinJSilk/following{/other_user}","gists_url":"https://api.github.com/users/DustinJSilk/gists{/gist_id}","starred_url":"https://api.github.com/users/DustinJSilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DustinJSilk/subscriptions","organizations_url":"https://api.github.com/users/DustinJSilk/orgs","repos_url":"https://api.github.com/users/DustinJSilk/repos","events_url":"https://api.github.com/users/DustinJSilk/events{/privacy}","received_events_url":"https://api.github.com/users/DustinJSilk/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T20:12:00Z","updated_at":"2015-12-24T20:12:00Z","body":"Fixed it! \r\n\r\nSo after moving the App folder out from the build folder and into the root. I just had to fix all the 404s.\r\nThat meant changing the templateUrls on the three pages it starts with from \"app/...\" to \"build/..\" and then also remove one level of \"../\" in the scss files that call for the node_modules folder."}}