Closed Haemoglobin closed 8 years ago
Hmmmm, I'm embarrassed to admit that I have not tested on Windows. I'll have to take a look and see what needs to be done.
For me, npm start gives this error:
dev_server.js:17
app.get('*', (req, res) => {
^^
SyntaxError: Unexpected token =>
You need a later version of nodejs
Awesome that worked but now I have a new error:
ERROR in ./index.tsx
Module build failed: TypeError: compiler.parseConfigFile is not a function
at ensureTypeScriptInstance
npm -v 3.3.12 node -v v5.5.0
Thanks for your help.
That's interesting. I just clean installed it and everything looks okay. What versions of typescript and ts-loader do you have installed? I have typescript@1.7.5
and ts-loader@0.7.2
.
Yep solved it, I was on ts-loader v0.5.1! Deleted and reinstalled to 0.7.2 and it's compiling now.
Thanks so much for your help and really great tutorial btw!
Just pulled the project fresh on a Windows box and I'm not seeing the error, although something similar happened when I didn't run tsd. Gonna close this for now.
I cloned the project, ran npm install, then tsd install, then npm start.
I got the following errors: ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\walker\skippableTokenAwareRuleWalker.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\rule\abstractRule.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\walker\syntaxWalker.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\walker\ruleWalker.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\languageServiceHost.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\utils.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\enableDisableRules.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\language\rule\rule.d.ts (1,21): error TS2307: Cannot find module 'typescript'.
ERROR in C:\dev\ts-hot-reload\react-typescript-boilerplate\node_modules\tslint\lib\lint.d.ts (12,15): error TS2307: Cannot find module './language/walker'.
When I navigate to http://localhost:3000 the browser downloads /static/app.js which has the same contents as index.html, so there is an error in the console Uncaught SyntaxError: Unexpected token
I am on node version 5.3.0. Anything I am doing wrong?
Thanks, Hamish