keokilee / react-typescript-boilerplate

Boilerplate project for setting up Typescript and React with Babel and Webpack.
ISC License
114 stars 23 forks source link

Application is not loading #24

Closed axelson closed 8 years ago

axelson commented 8 years ago

On a fresh install of node and all dependencies I am having issues trying to load the application. The home page loads okay but app.js isn't being loaded statically. Instead it's serving the home page. This is what I'm seeing:

bash-3.2$ curl http://localhost:3000/static/app.js
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Home</title>
</head>
<body>
  <div id="app"></div>

  <script src="/static/app.js"></script>
</body>
</html>

Possibly related I am seeing this as the last input in the terminal that is running npm start:

ERROR in [default] /Users/jason/dev/react-typescript-boilerplate/typings/node/node.d.ts:54:12 
Subsequent variable declarations must have the same type.  Variable 'require' must be of type 'WebpackRequire', but here has type 'NodeRequire'.

Changing that line does indeed get it to work correctly.

axelson commented 8 years ago

And apparently you've been working on this tonight and have fixed/worked around that issue by not pulling in the node typing library.