smikhalevski / react-redux-typescript-babel-webpack-boilerplate

Boilerplate project for setting up React + Redux + TypeScript + Babel + Webpack stack. Also uses LESS for stylesheets and Jasmine for unit tests.
10 stars 2 forks source link

Unable to start using the latest version of node and typings #1

Open fc opened 8 years ago

fc commented 8 years ago

Unable to run with the latest version of Node and typings etc. I would be submitting a PR if I had been able to resolve it but I did not. Below is a summary of the changes:

diff --git a/package.json b/package.json
index dc406ff..b08c6fd 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@

     "webpack": "1.12.9",
     "webpack-dev-server": "1.12.0",
-    "babel-loader": "6.2.0",
+    "babel-loader": "6.2.7",
     "ts-loader": "",
     "hson-loader": "1.0.0",
     "less-loader": "",
@@ -29,7 +29,7 @@
     "typescript": "",
     "typings": "",

-    "babel-core": "6.3.26",
+    "babel-core": "6.18.2",
     "babel-preset-es2015": "",
     "babel-preset-stage-0": "",
     "babel-plugin-transform-runtime": "",
diff --git a/tsconfig.json b/tsconfig.json
index 1fa13f6..4749fb0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -6,7 +6,7 @@
     "pretty": true
   },
   "files": [
-    "./typings/main.d.ts",
+    "./typings/index.d.ts",
     "./src/main/typings/index.d.ts"
   ]
 }
diff --git a/typings.json b/typings.json
index 7e452d6..df4572c 100644
--- a/typings.json
+++ b/typings.json
@@ -1,12 +1,13 @@
 {
   "name": "react-redux-typescript-babel-webpack-seed",
-  "ambientDependencies": {
+  "globalDependencies": {
     "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts",
     "lodash": "github:DefinitelyTyped/DefinitelyTyped/lodash/lodash.d.ts",
     "react": "github:DefinitelyTyped/DefinitelyTyped/react/react.d.ts",
     "react-dom": "github:DefinitelyTyped/DefinitelyTyped/react/react-dom.d.ts",
     "redux": "github:DefinitelyTyped/DefinitelyTyped/redux/redux.d.ts",
     "redux-thunk": "github:DefinitelyTyped/DefinitelyTyped/redux-thunk/redux-thunk.d.ts",
-    "whatwg-fetch": "github:DefinitelyTyped/DefinitelyTyped/whatwg-fetch/whatwg-fetch.d.ts"
+    "whatwg-fetch": "github:DefinitelyTyped/DefinitelyTyped/whatwg-fetch/whatwg-fetch.d.ts",
+    "whatwg-streams": "github:DefinitelyTyped/DefinitelyTyped/whatwg-streams/whatwg-streams.d.ts"
   }
 }

I was able to prevent the errors I experienced in the above by using the following but it didn't seem to be parsing the HTML template code anymore:

    "html-webpack-plugin": "2.24.1",
    "extract-text-webpack-plugin": "1.0.1",
fc commented 8 years ago

Forgot to add the error message.

ERROR in Path must be a string. Received undefined
Child extract-text-webpack-plugin:
    chunk    {0} extract-text-webpack-plugin-output-filename 1.77 kB [rendered]
        [0] ./~/css-loader!./~/less-loader?strictUnits=true&strictMath=true!./src/main/less/index.less 268 bytes {0} [built]
        [1] ./~/css-loader/lib/css-base.js 1.51 kB {0} [built]
smikhalevski commented 8 years ago

@fc I added explicit versions to package.json so now you can checkout, run:

  1. npm install
  2. npm run typings-install
  3. npm start to launch dev server on http://localhost:8080.

Some deps are outdated, and I would greatly appreciate if you can update them with PR.