aspnet / JavaScriptServices

[Archived] This repository has been archived
Apache License 2.0
3.04k stars 521 forks source link

New React/Redux project: webpack fails with Typescript errors #1066

Closed jimsmart closed 7 years ago

jimsmart commented 7 years ago

Hi,

New project freshly generated with 'React with Redux' fails to build.

Project created with only 'React' works ok.

— Looks like it's because of Typescript definitions? Is there a workaround?

Thanks!

Details: OSX 10.11.6 Node v6.11.0 Installed dotnet-dev-osx-x64.1.0.4.pkg

Reproduce:

$ npm install -g yo generator-aspnetcore-spa

$ mkdir test1
$ cd test1
$ yo aspnetcore-spa
// choose React with Redux
// web pack fails
// full output:

     _-----_     ╭──────────────────────────╮
    |       |    │  Welcome to the ASP.NET  │
    |--(o)--|    │   Core Single-Page App   │
   `---------´   │        generator!        │
    ( _´U`_ )    │                          │
    /___A___\   /│      Version: 0.9.3      │
     |  ~  |     ╰──────────────────────────╯
   __'.___.'__   
 ´   `  |° ´ Y ` 

? Framework React with Redux
? Your project name test1

I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.

   create package.json
   create .template.config/icon.png
   create appsettings.json
   create ClientApp/boot-client.tsx
   create ClientApp/boot-server.tsx
   create ClientApp/components/Counter.tsx
   create ClientApp/components/FetchData.tsx
   create ClientApp/components/Home.tsx
   create ClientApp/components/Layout.tsx
   create ClientApp/components/NavMenu.tsx
   create ClientApp/configureStore.ts
   create ClientApp/css/site.css
   create ClientApp/dist/89889688147bd7575d6327160d64e760.svg
   create ClientApp/dist/main-server.js
   create ClientApp/dist/vendor-manifest.json
   create ClientApp/dist/vendor.js
   create ClientApp/routes.tsx
   create ClientApp/store/Counter.ts
   create ClientApp/store/index.ts
   create ClientApp/store/WeatherForecasts.ts
   create Controllers/HomeController.cs
   create Controllers/SampleDataController.cs
   create global.json
   create Program.cs
   create Startup.cs
   create .gitignore
   create Test1.csproj
   create tsconfig.json
   create Views/_ViewImports.cshtml
   create Views/_ViewStart.cshtml
   create Views/Home/Index.cshtml
   create Views/Shared/_Layout.cshtml
   create Views/Shared/Error.cshtml
   create web.config
   create webpack.config.js
   create webpack.config.vendor.js
   create wwwroot/dist/89889688147bd7575d6327160d64e760.svg
   create wwwroot/dist/main-client.js
   create wwwroot/dist/main-client.js.map
   create wwwroot/dist/site.css
   create wwwroot/dist/site.css.map
   create wwwroot/dist/vendor-manifest.json
   create wwwroot/dist/vendor.css
   create wwwroot/dist/vendor.js
   create wwwroot/favicon.ico

> fsevents@1.1.2 install /Users/jimsmart/workspace/test1/node_modules/fsevents
> node install

[fsevents] Success: "/Users/jimsmart/workspace/test1/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
WebApplicationBasic@0.0.0 /Users/jimsmart/workspace/test1
├── @types/history@4.5.1 
├── @types/react@15.0.24 
├── @types/react-dom@15.5.0 
├── @types/react-redux@4.4.40 
├─┬ @types/react-router-dom@4.0.4 
│ └── @types/react-router@4.0.12 
├── @types/react-router-redux@5.0.1 
├─┬ @types/webpack@2.2.15 
│ ├── @types/node@8.0.2 
│ ├── @types/tapable@0.2.3 
│ └─┬ @types/uglify-js@2.6.29 
│   └── @types/source-map@0.5.0 
├── @types/webpack-env@1.13.0 
├─┬ aspnet-prerendering@2.0.6 
│ └── domain-task@2.0.3 
├─┬ aspnet-webpack@1.0.29 
│ ├─┬ connect@3.6.2 
│ │ ├─┬ debug@2.6.7 
│ │ │ └── ms@2.0.0 
│ │ ├─┬ finalhandler@1.0.3 
│ │ │ ├── encodeurl@1.0.1 
│ │ │ ├── escape-html@1.0.3 
│ │ │ ├─┬ on-finished@2.3.0 
│ │ │ │ └── ee-first@1.1.1 
│ │ │ ├── statuses@1.3.1 
│ │ │ └── unpipe@1.0.0 
│ │ ├── parseurl@1.3.1 
│ │ └── utils-merge@1.0.0 
│ ├── es6-promise@3.3.1 
│ ├─┬ memory-fs@0.3.0 
│ │ ├─┬ errno@0.1.4 
│ │ │ └── prr@0.0.0 
│ │ └─┬ readable-stream@2.3.2 
│ │   ├── core-util-is@1.0.2 
│ │   ├── inherits@2.0.3 
│ │   ├── isarray@1.0.0 
│ │   ├── process-nextick-args@1.0.7 
│ │   ├── safe-buffer@5.1.1 
│ │   ├── string_decoder@1.0.3 
│ │   └── util-deprecate@1.0.2 
│ ├── require-from-string@1.2.1 
│ ├─┬ webpack-dev-middleware@1.11.0 
│ │ ├── memory-fs@0.4.1 
│ │ ├── path-is-absolute@1.0.1 
│ │ └── range-parser@1.2.0 
│ └── webpack-node-externals@1.6.0 
├── aspnet-webpack-react@2.0.0 
├─┬ awesome-typescript-loader@3.1.3 
│ ├── colors@1.1.2 
│ ├─┬ enhanced-resolve@3.1.0 
│ │ ├── graceful-fs@4.1.11 
│ │ └── memory-fs@0.4.1 
│ ├─┬ loader-utils@1.1.0 
│ │ ├── big.js@3.1.3 
│ │ └── emojis-list@2.1.0 
│ ├── lodash@4.17.4 
│ ├─┬ mkdirp@0.5.1 
│ │ └── minimist@0.0.8 
│ ├── object-assign@4.1.1 
│ └── source-map-support@0.4.15 
├── bootstrap@3.3.7 
├─┬ css-loader@0.28.1 
│ ├─┬ babel-code-frame@6.22.0 
│ │ ├─┬ chalk@1.1.3 
│ │ │ ├── ansi-styles@2.2.1 
│ │ │ ├── escape-string-regexp@1.0.5 
│ │ │ ├── has-ansi@2.0.0 
│ │ │ └── supports-color@2.0.0 
│ │ ├── esutils@2.0.2 
│ │ └── js-tokens@3.0.1 
│ ├─┬ css-selector-tokenizer@0.7.0 
│ │ ├── cssesc@0.1.0 
│ │ ├── fastparse@1.1.1 
│ │ └─┬ regexpu-core@1.0.0 
│ │   ├── regenerate@1.3.2 
│ │   ├── regjsgen@0.2.0 
│ │   └─┬ regjsparser@0.1.5 
│ │     └── jsesc@0.5.0 
│ ├─┬ cssnano@3.10.0 
│ │ ├─┬ autoprefixer@6.7.7 
│ │ │ ├─┬ browserslist@1.7.7 
│ │ │ │ └── electron-to-chromium@1.3.14 
│ │ │ ├── caniuse-db@1.0.30000694 
│ │ │ ├── normalize-range@0.1.2 
│ │ │ └── num2fraction@1.2.2 
│ │ ├── decamelize@1.2.0 
│ │ ├── defined@1.0.0 
│ │ ├─┬ has@1.0.1 
│ │ │ └── function-bind@1.1.0 
│ │ ├─┬ postcss-calc@5.3.1 
│ │ │ ├── postcss-message-helpers@2.0.0 
│ │ │ └─┬ reduce-css-calc@1.3.0 
│ │ │   ├── balanced-match@0.4.2 
│ │ │   ├── math-expression-evaluator@1.2.17 
│ │ │   └── reduce-function-call@1.0.2 
│ │ ├─┬ postcss-colormin@2.2.2 
│ │ │ └─┬ colormin@1.1.2 
│ │ │   ├─┬ color@0.11.4 
│ │ │   │ ├── clone@1.0.2 
│ │ │   │ ├─┬ color-convert@1.9.0 
│ │ │   │ │ └── color-name@1.1.2 
│ │ │   │ └── color-string@0.3.0 
│ │ │   └── css-color-names@0.0.4 
│ │ ├── postcss-convert-values@2.6.1 
│ │ ├── postcss-discard-comments@2.0.4 
│ │ ├── postcss-discard-duplicates@2.1.0 
│ │ ├── postcss-discard-empty@2.1.0 
│ │ ├── postcss-discard-overridden@0.1.1 
│ │ ├─┬ postcss-discard-unused@2.2.3 
│ │ │ └── uniqs@2.0.0 
│ │ ├─┬ postcss-filter-plugins@2.0.2 
│ │ │ └─┬ uniqid@4.1.1 
│ │ │   └── macaddress@0.2.8 
│ │ ├── postcss-merge-idents@2.1.7 
│ │ ├── postcss-merge-longhand@2.0.2 
│ │ ├─┬ postcss-merge-rules@2.1.2 
│ │ │ ├─┬ caniuse-api@1.6.1 
│ │ │ │ ├── lodash.memoize@4.1.2 
│ │ │ │ └── lodash.uniq@4.5.0 
│ │ │ ├─┬ postcss-selector-parser@2.2.3 
│ │ │ │ ├── flatten@1.0.2 
│ │ │ │ ├── indexes-of@1.0.1 
│ │ │ │ └── uniq@1.0.1 
│ │ │ └── vendors@1.0.1 
│ │ ├── postcss-minify-font-values@1.0.5 
│ │ ├── postcss-minify-gradients@1.0.5 
│ │ ├─┬ postcss-minify-params@1.2.2 
│ │ │ └── alphanum-sort@1.0.2 
│ │ ├── postcss-minify-selectors@2.1.1 
│ │ ├── postcss-normalize-charset@1.1.1 
│ │ ├─┬ postcss-normalize-url@3.0.8 
│ │ │ ├── is-absolute-url@2.1.0 
│ │ │ └─┬ normalize-url@1.9.1 
│ │ │   ├── prepend-http@1.0.4 
│ │ │   ├─┬ query-string@4.3.4 
│ │ │   │ └── strict-uri-encode@1.1.0 
│ │ │   └─┬ sort-keys@1.1.2 
│ │ │     └── is-plain-obj@1.1.0 
│ │ ├── postcss-ordered-values@2.2.3 
│ │ ├── postcss-reduce-idents@2.4.0 
│ │ ├── postcss-reduce-initial@1.0.1 
│ │ ├── postcss-reduce-transforms@1.0.4 
│ │ ├─┬ postcss-svgo@2.1.6 
│ │ │ ├─┬ is-svg@2.1.0 
│ │ │ │ └── html-comment-regex@1.1.1 
│ │ │ └─┬ svgo@0.7.2 
│ │ │   ├─┬ coa@1.0.3 
│ │ │   │ └── q@1.5.0 
│ │ │   ├─┬ csso@2.3.2 
│ │ │   │ └── clap@1.2.0 
│ │ │   ├─┬ js-yaml@3.7.0 
│ │ │   │ ├─┬ argparse@1.0.9 
│ │ │   │ │ └── sprintf-js@1.0.3 
│ │ │   │ └── esprima@2.7.3 
│ │ │   ├── sax@1.2.4 
│ │ │   └── whet.extend@0.9.9 
│ │ ├── postcss-unique-selectors@2.0.2 
│ │ └── postcss-zindex@2.2.0 
│ ├── lodash.camelcase@4.3.0 
│ ├─┬ postcss@5.2.17 
│ │ ├── js-base64@2.1.9 
│ │ └── supports-color@3.2.3 
│ ├─┬ postcss-modules-extract-imports@1.1.0 
│ │ └─┬ postcss@6.0.3 
│ │   └─┬ supports-color@4.0.0 
│ │     └── has-flag@2.0.0 
│ ├─┬ postcss-modules-local-by-default@1.2.0 
│ │ └─┬ postcss@6.0.3 
│ │   └─┬ supports-color@4.0.0 
│ │     └── has-flag@2.0.0 
│ ├─┬ postcss-modules-scope@1.1.0 
│ │ └─┬ postcss@6.0.3 
│ │   └─┬ supports-color@4.0.0 
│ │     └── has-flag@2.0.0 
│ ├─┬ postcss-modules-values@1.3.0 
│ │ ├── icss-replace-symbols@1.1.0 
│ │ └─┬ postcss@6.0.3 
│ │   └─┬ supports-color@4.0.0 
│ │     └── has-flag@2.0.0 
│ ├── postcss-value-parser@3.3.0 
│ └── source-list-map@0.1.8 
├─┬ domain-task@3.0.0 
│ ├── domain-context@0.5.1 
│ └─┬ isomorphic-fetch@2.2.1 
│   ├─┬ node-fetch@1.7.1 
│   │ ├─┬ encoding@0.1.12 
│   │ │ └── iconv-lite@0.4.18 
│   │ └── is-stream@1.1.0 
│   └── whatwg-fetch@2.0.3 
├── event-source-polyfill@0.0.9 
├─┬ extract-text-webpack-plugin@2.1.0 
│ ├─┬ ajv@4.11.8 
│ │ ├── co@4.6.0 
│ │ └─┬ json-stable-stringify@1.0.1 
│ │   └── jsonify@0.0.0 
│ ├── async@2.5.0 
│ └── webpack-sources@0.1.5 
├── file-loader@0.11.1 
├─┬ history@4.6.1 
│ ├── invariant@2.2.2 
│ ├── loose-envify@1.3.1 
│ ├── resolve-pathname@2.1.0 
│ ├── value-equal@0.2.1 
│ └── warning@3.0.0 
├── jquery@3.2.1 
├── json-loader@0.5.4 
├── node-noop@1.0.0 
├─┬ react@15.5.4 
│ ├─┬ fbjs@0.8.12 
│ │ ├── core-js@1.2.7 
│ │ ├─┬ promise@7.3.1 
│ │ │ └── asap@2.0.5 
│ │ ├── setimmediate@1.0.5 
│ │ └── ua-parser-js@0.7.13 
│ └── prop-types@15.5.10 
├── react-dom@15.5.4 
├─┬ react-hot-loader@3.0.0-beta.7 
│ ├─┬ babel-template@6.25.0 
│ │ ├─┬ babel-runtime@6.23.0 
│ │ │ ├── core-js@2.4.1 
│ │ │ └── regenerator-runtime@0.10.5 
│ │ ├─┬ babel-traverse@6.25.0 
│ │ │ ├── babel-messages@6.23.0 
│ │ │ └── globals@9.18.0 
│ │ ├─┬ babel-types@6.25.0 
│ │ │ └── to-fast-properties@1.0.3 
│ │ └── babylon@6.17.4 
│ ├─┬ global@4.3.2 
│ │ ├─┬ min-document@2.19.0 
│ │ │ └── dom-walk@0.1.1 
│ │ └── process@0.5.2 
│ ├── react-deep-force-update@2.0.1 
│ ├── react-proxy@3.0.0-alpha.1 
│ ├─┬ redbox-react@1.4.2 
│ │ ├─┬ error-stack-parser@1.3.6 
│ │ │ └── stackframe@0.3.1 
│ │ └── sourcemapped-stacktrace@1.1.6 
│ └─┬ source-map@0.4.4 
│   └── amdefine@1.0.1 
├─┬ react-redux@5.0.4 
│ ├── create-react-class@15.6.0 
│ ├── hoist-non-react-statics@1.2.0 
│ └── lodash-es@4.17.4 
├─┬ react-router-dom@4.1.1 
│ └─┬ react-router@4.1.1 
│   └─┬ path-to-regexp@1.7.0 
│     └── isarray@0.0.1 
├── react-router-redux@5.0.0-alpha.6 
├─┬ redux@3.6.0 
│ └── symbol-observable@1.0.4 
├── redux-thunk@2.2.0 
├── style-loader@0.17.0 
├── typescript@2.3.2 
├─┬ url-loader@0.5.8 
│ └── mime@1.3.6 
├─┬ webpack@2.5.1 
│ ├── acorn@5.0.3 
│ ├─┬ acorn-dynamic-import@2.0.2 
│ │ └── acorn@4.0.13 
│ ├── ajv-keywords@1.5.1 
│ ├── interpret@1.0.3 
│ ├── json5@0.5.1 
│ ├── loader-runner@2.3.0 
│ ├── loader-utils@0.2.17 
│ ├── memory-fs@0.4.1 
│ ├─┬ node-libs-browser@2.0.0 
│ │ ├── assert@1.4.1 
│ │ ├─┬ browserify-zlib@0.1.4 
│ │ │ └── pako@0.2.9 
│ │ ├─┬ buffer@4.9.1 
│ │ │ ├── base64-js@1.2.1 
│ │ │ └── ieee754@1.1.8 
│ │ ├─┬ console-browserify@1.1.0 
│ │ │ └── date-now@0.1.4 
│ │ ├── constants-browserify@1.0.0 
│ │ ├─┬ crypto-browserify@3.11.0 
│ │ │ ├─┬ browserify-cipher@1.0.0 
│ │ │ │ ├─┬ browserify-aes@1.0.6 
│ │ │ │ │ └── buffer-xor@1.0.3 
│ │ │ │ ├─┬ browserify-des@1.0.0 
│ │ │ │ │ └── des.js@1.0.0 
│ │ │ │ └── evp_bytestokey@1.0.0 
│ │ │ ├─┬ browserify-sign@4.0.4 
│ │ │ │ ├── bn.js@4.11.7 
│ │ │ │ ├── browserify-rsa@4.0.1 
│ │ │ │ ├─┬ elliptic@6.4.0 
│ │ │ │ │ ├── brorand@1.1.0 
│ │ │ │ │ ├── hash.js@1.1.1 
│ │ │ │ │ ├── hmac-drbg@1.0.1 
│ │ │ │ │ ├── minimalistic-assert@1.0.0 
│ │ │ │ │ └── minimalistic-crypto-utils@1.0.1 
│ │ │ │ └─┬ parse-asn1@5.1.0 
│ │ │ │   └── asn1.js@4.9.1 
│ │ │ ├── create-ecdh@4.0.0 
│ │ │ ├─┬ create-hash@1.1.3 
│ │ │ │ ├── cipher-base@1.0.3 
│ │ │ │ ├─┬ ripemd160@2.0.1 
│ │ │ │ │ └── hash-base@2.0.2 
│ │ │ │ └── sha.js@2.4.8 
│ │ │ ├── create-hmac@1.1.6 
│ │ │ ├─┬ diffie-hellman@5.0.2 
│ │ │ │ └── miller-rabin@4.0.0 
│ │ │ ├── pbkdf2@3.0.12 
│ │ │ ├── public-encrypt@4.0.0 
│ │ │ └── randombytes@2.0.5 
│ │ ├── domain-browser@1.1.7 
│ │ ├── events@1.1.1 
│ │ ├── https-browserify@0.0.1 
│ │ ├── os-browserify@0.2.1 
│ │ ├── path-browserify@0.0.0 
│ │ ├── process@0.11.10 
│ │ ├── punycode@1.4.1 
│ │ ├── querystring-es3@0.2.1 
│ │ ├── stream-browserify@2.0.1 
│ │ ├─┬ stream-http@2.7.2 
│ │ │ ├── builtin-status-codes@3.0.0 
│ │ │ ├── to-arraybuffer@1.0.1 
│ │ │ └── xtend@4.0.1 
│ │ ├── string_decoder@0.10.31 
│ │ ├── timers-browserify@2.0.2 
│ │ ├── tty-browserify@0.0.0 
│ │ ├─┬ url@0.11.0 
│ │ │ └── punycode@1.3.2 
│ │ ├─┬ util@0.10.3 
│ │ │ └── inherits@2.0.1 
│ │ └─┬ vm-browserify@0.0.4 
│ │   └── indexof@0.0.1 
│ ├── source-map@0.5.6 
│ ├─┬ supports-color@3.2.3 
│ │ └── has-flag@1.0.0 
│ ├── tapable@0.2.6 
│ ├─┬ uglify-js@2.8.29 
│ │ ├── uglify-to-browserify@1.0.2 
│ │ └─┬ yargs@3.10.0 
│ │   ├── camelcase@1.2.1 
│ │   ├─┬ cliui@2.1.0 
│ │   │ ├─┬ center-align@0.1.3 
│ │   │ │ ├─┬ align-text@0.1.4 
│ │   │ │ │ ├── longest@1.0.1 
│ │   │ │ │ └── repeat-string@1.6.1 
│ │   │ │ └── lazy-cache@1.0.4 
│ │   │ ├── right-align@0.1.3 
│ │   │ └── wordwrap@0.0.2 
│ │   └── window-size@0.1.0 
│ ├─┬ watchpack@1.3.1 
│ │ └─┬ chokidar@1.7.0 
│ │   ├─┬ anymatch@1.3.0 
│ │   │ ├── arrify@1.0.1 
│ │   │ └─┬ micromatch@2.3.11 
│ │   │   ├─┬ arr-diff@2.0.0 
│ │   │   │ └── arr-flatten@1.0.3 
│ │   │   ├── array-unique@0.2.1 
│ │   │   ├─┬ braces@1.8.5 
│ │   │   │ ├─┬ expand-range@1.8.2 
│ │   │   │ │ └─┬ fill-range@2.2.3 
│ │   │   │ │   ├── is-number@2.1.0 
│ │   │   │ │   ├── isobject@2.1.0 
│ │   │   │ │   └─┬ randomatic@1.1.7 
│ │   │   │ │     ├─┬ is-number@3.0.0 
│ │   │   │ │     │ └── kind-of@3.2.2 
│ │   │   │ │     └── kind-of@4.0.0 
│ │   │   │ ├── preserve@0.2.0 
│ │   │   │ └── repeat-element@1.1.2 
│ │   │   ├─┬ expand-brackets@0.1.5 
│ │   │   │ └── is-posix-bracket@0.1.1 
│ │   │   ├── extglob@0.3.2 
│ │   │   ├── filename-regex@2.0.1 
│ │   │   ├─┬ kind-of@3.2.2 
│ │   │   │ └── is-buffer@1.1.5 
│ │   │   ├─┬ normalize-path@2.1.1 
│ │   │   │ └── remove-trailing-separator@1.0.2 
│ │   │   ├─┬ object.omit@2.0.1 
│ │   │   │ ├─┬ for-own@0.1.5 
│ │   │   │ │ └── for-in@1.0.2 
│ │   │   │ └── is-extendable@0.1.1 
│ │   │   ├─┬ parse-glob@3.0.4 
│ │   │   │ ├── glob-base@0.3.0 
│ │   │   │ └── is-dotfile@1.0.3 
│ │   │   └─┬ regex-cache@0.4.3 
│ │   │     ├── is-equal-shallow@0.1.3 
│ │   │     └── is-primitive@2.0.0 
│ │   ├── async-each@1.0.1 
│ │   ├─┬ fsevents@1.1.2 
│ │   │ ├── nan@2.6.2 
│ │   │ └─┬ node-pre-gyp@0.6.36 
│ │   │   ├─┬ mkdirp@0.5.1 
│ │   │   │ └── minimist@0.0.8 
│ │   │   ├─┬ nopt@4.0.1 
│ │   │   │ ├── abbrev@1.1.0 
│ │   │   │ └─┬ osenv@0.1.4 
│ │   │   │   ├── os-homedir@1.0.2 
│ │   │   │   └── os-tmpdir@1.0.2 
│ │   │   ├─┬ npmlog@4.1.0 
│ │   │   │ ├─┬ are-we-there-yet@1.1.4 
│ │   │   │ │ └── delegates@1.0.0 
│ │   │   │ ├── console-control-strings@1.1.0 
│ │   │   │ ├─┬ gauge@2.7.4 
│ │   │   │ │ ├── aproba@1.1.1 
│ │   │   │ │ ├── has-unicode@2.0.1 
│ │   │   │ │ ├── object-assign@4.1.1 
│ │   │   │ │ ├── signal-exit@3.0.2 
│ │   │   │ │ ├─┬ string-width@1.0.2 
│ │   │   │ │ │ ├── code-point-at@1.1.0 
│ │   │   │ │ │ └─┬ is-fullwidth-code-point@1.0.0 
│ │   │   │ │ │   └── number-is-nan@1.0.1 
│ │   │   │ │ ├─┬ strip-ansi@3.0.1 
│ │   │   │ │ │ └── ansi-regex@2.1.1 
│ │   │   │ │ └── wide-align@1.1.2 
│ │   │   │ └── set-blocking@2.0.0 
│ │   │   ├─┬ rc@1.2.1 
│ │   │   │ ├── deep-extend@0.4.2 
│ │   │   │ ├── ini@1.3.4 
│ │   │   │ ├── minimist@1.2.0 
│ │   │   │ └── strip-json-comments@2.0.1 
│ │   │   ├─┬ request@2.81.0 
│ │   │   │ ├── aws-sign2@0.6.0 
│ │   │   │ ├── aws4@1.6.0 
│ │   │   │ ├── caseless@0.12.0 
│ │   │   │ ├─┬ combined-stream@1.0.5 
│ │   │   │ │ └── delayed-stream@1.0.0 
│ │   │   │ ├── extend@3.0.1 
│ │   │   │ ├── forever-agent@0.6.1 
│ │   │   │ ├─┬ form-data@2.1.4 
│ │   │   │ │ └── asynckit@0.4.0 
│ │   │   │ ├─┬ har-validator@4.2.1 
│ │   │   │ │ ├─┬ ajv@4.11.8 
│ │   │   │ │ │ ├── co@4.6.0 
│ │   │   │ │ │ └─┬ json-stable-stringify@1.0.1 
│ │   │   │ │ │   └── jsonify@0.0.0 
│ │   │   │ │ └── har-schema@1.0.5 
│ │   │   │ ├─┬ hawk@3.1.3 
│ │   │   │ │ ├── boom@2.10.1 
│ │   │   │ │ ├── cryptiles@2.0.5 
│ │   │   │ │ ├── hoek@2.16.3 
│ │   │   │ │ └── sntp@1.0.9 
│ │   │   │ ├─┬ http-signature@1.1.1 
│ │   │   │ │ ├── assert-plus@0.2.0 
│ │   │   │ │ ├─┬ jsprim@1.4.0 
│ │   │   │ │ │ ├── assert-plus@1.0.0 
│ │   │   │ │ │ ├── extsprintf@1.0.2 
│ │   │   │ │ │ ├── json-schema@0.2.3 
│ │   │   │ │ │ └── verror@1.3.6 
│ │   │   │ │ └─┬ sshpk@1.13.0 
│ │   │   │ │   ├── asn1@0.2.3 
│ │   │   │ │   ├── assert-plus@1.0.0 
│ │   │   │ │   ├── bcrypt-pbkdf@1.0.1 
│ │   │   │ │   ├─┬ dashdash@1.14.1 
│ │   │   │ │   │ └── assert-plus@1.0.0 
│ │   │   │ │   ├── ecc-jsbn@0.1.1 
│ │   │   │ │   ├─┬ getpass@0.1.7 
│ │   │   │ │   │ └── assert-plus@1.0.0 
│ │   │   │ │   ├── jodid25519@1.0.2 
│ │   │   │ │   ├── jsbn@0.1.1 
│ │   │   │ │   └── tweetnacl@0.14.5 
│ │   │   │ ├── is-typedarray@1.0.0 
│ │   │   │ ├── isstream@0.1.2 
│ │   │   │ ├── json-stringify-safe@5.0.1 
│ │   │   │ ├─┬ mime-types@2.1.15 
│ │   │   │ │ └── mime-db@1.27.0 
│ │   │   │ ├── oauth-sign@0.8.2 
│ │   │   │ ├── performance-now@0.2.0 
│ │   │   │ ├── qs@6.4.0 
│ │   │   │ ├── safe-buffer@5.0.1 
│ │   │   │ ├── stringstream@0.0.5 
│ │   │   │ ├─┬ tough-cookie@2.3.2 
│ │   │   │ │ └── punycode@1.4.1 
│ │   │   │ ├── tunnel-agent@0.6.0 
│ │   │   │ └── uuid@3.0.1 
│ │   │   ├─┬ rimraf@2.6.1 
│ │   │   │ └─┬ glob@7.1.2 
│ │   │   │   ├── fs.realpath@1.0.0 
│ │   │   │   ├── inflight@1.0.6 
│ │   │   │   ├─┬ minimatch@3.0.4 
│ │   │   │   │ └─┬ brace-expansion@1.1.7 
│ │   │   │   │   ├── balanced-match@0.4.2 
│ │   │   │   │   └── concat-map@0.0.1 
│ │   │   │   └── path-is-absolute@1.0.1 
│ │   │   ├── semver@5.3.0 
│ │   │   ├─┬ tar@2.2.1 
│ │   │   │ ├── block-stream@0.0.9 
│ │   │   │ ├─┬ fstream@1.0.11 
│ │   │   │ │ └── graceful-fs@4.1.11 
│ │   │   │ └── inherits@2.0.3 
│ │   │   └─┬ tar-pack@3.4.0 
│ │   │     ├─┬ debug@2.6.8 
│ │   │     │ └── ms@2.0.0 
│ │   │     ├── fstream-ignore@1.0.5 
│ │   │     ├─┬ once@1.4.0 
│ │   │     │ └── wrappy@1.0.2 
│ │   │     ├─┬ readable-stream@2.2.9 
│ │   │     │ ├── buffer-shims@1.0.0 
│ │   │     │ ├── core-util-is@1.0.2 
│ │   │     │ ├── isarray@1.0.0 
│ │   │     │ ├── process-nextick-args@1.0.7 
│ │   │     │ ├── string_decoder@1.0.1 
│ │   │     │ └── util-deprecate@1.0.2 
│ │   │     └── uid-number@0.0.6 
│ │   ├── glob-parent@2.0.0 
│ │   ├─┬ is-binary-path@1.0.1 
│ │   │ └── binary-extensions@1.8.0 
│ │   ├─┬ is-glob@2.0.1 
│ │   │ └── is-extglob@1.0.0 
│ │   └─┬ readdirp@2.1.0 
│ │     ├─┬ minimatch@3.0.4 
│ │     │ └─┬ brace-expansion@1.1.8 
│ │     │   ├── balanced-match@1.0.0 
│ │     │   └── concat-map@0.0.1 
│ │     └── set-immediate-shim@1.0.1 
│ ├─┬ webpack-sources@0.2.3 
│ │ └── source-list-map@1.1.2 
│ └─┬ yargs@6.6.0 
│   ├── camelcase@3.0.0 
│   ├─┬ cliui@3.2.0 
│   │ └── wrap-ansi@2.1.0 
│   ├── get-caller-file@1.0.2 
│   ├─┬ os-locale@1.4.0 
│   │ └─┬ lcid@1.0.0 
│   │   └── invert-kv@1.0.0 
│   ├─┬ read-pkg-up@1.0.1 
│   │ ├─┬ find-up@1.1.2 
│   │ │ ├── path-exists@2.1.0 
│   │ │ └─┬ pinkie-promise@2.0.1 
│   │ │   └── pinkie@2.0.4 
│   │ └─┬ read-pkg@1.1.0 
│   │   ├─┬ load-json-file@1.1.0 
│   │   │ ├─┬ parse-json@2.2.0 
│   │   │ │ └─┬ error-ex@1.3.1 
│   │   │ │   └── is-arrayish@0.2.1 
│   │   │ ├── pify@2.3.0 
│   │   │ └─┬ strip-bom@2.0.0 
│   │   │   └── is-utf8@0.2.1 
│   │   ├─┬ normalize-package-data@2.3.8 
│   │   │ ├── hosted-git-info@2.4.2 
│   │   │ ├─┬ is-builtin-module@1.0.0 
│   │   │ │ └── builtin-modules@1.1.1 
│   │   │ ├── semver@5.3.0 
│   │   │ └─┬ validate-npm-package-license@3.0.1 
│   │   │   ├─┬ spdx-correct@1.0.2 
│   │   │   │ └── spdx-license-ids@1.2.2 
│   │   │   └── spdx-expression-parse@1.0.4 
│   │   └── path-type@1.1.0 
│   ├── require-directory@2.1.1 
│   ├── require-main-filename@1.0.1 
│   ├── set-blocking@2.0.0 
│   ├─┬ string-width@1.0.2 
│   │ ├── code-point-at@1.1.0 
│   │ └─┬ is-fullwidth-code-point@1.0.0 
│   │   └── number-is-nan@1.0.1 
│   ├── which-module@1.0.0 
│   ├── y18n@3.2.1 
│   └─┬ yargs-parser@4.2.1 
│     └── camelcase@3.0.0 
├─┬ webpack-hot-middleware@2.18.0 
│ ├── ansi-html@0.0.7 
│ ├── html-entities@1.2.1 
│ ├── querystring@0.2.0 
│ └─┬ strip-ansi@3.0.1 
│   └── ansi-regex@2.1.1 
└── webpack-merge@4.1.0 

npm WARN WebApplicationBasic@0.0.0 No description
npm WARN WebApplicationBasic@0.0.0 No repository field.
npm WARN WebApplicationBasic@0.0.0 No license field.
  Restoring packages for /Users/jimsmart/workspace/test1/Test1.csproj...
  Generating MSBuild file /Users/jimsmart/workspace/test1/obj/Test1.csproj.nuget.g.props.
  Generating MSBuild file /Users/jimsmart/workspace/test1/obj/Test1.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /Users/jimsmart/workspace/test1/obj/project.assets.json
  Restore completed in 2.38 sec for /Users/jimsmart/workspace/test1/Test1.csproj.

  NuGet Config files used:
      /Users/jimsmart/.nuget/NuGet/NuGet.Config

  Feeds used:
      https://api.nuget.org/v3/index.json
Hash: af2088012a1b2e840d4e59b6b95a03906f72a83f
Version: webpack 2.5.1
Child
    Hash: af2088012a1b2e840d4e
    Time: 14425ms
                                   Asset     Size  Chunks                    Chunk Names
    89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]         
                               vendor.js  1.37 MB       0  [emitted]  [big]  vendor
                              vendor.css   315 kB       0  [emitted]  [big]  vendor
Child
    Hash: 59b6b95a03906f72a83f
    Time: 14760ms
                                   Asset     Size  Chunks                    Chunk Names
    89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]         
                               vendor.js  1.82 MB       0  [emitted]  [big]  vendor

[at-loader] Checking finished with 11 errors

[at-loader] Checking finished with 11 errors
Hash: 08f575dd6f1e8269fbfde6a114b21af4daf8a817
Version: webpack 2.5.1
Child
    Hash: 08f575dd6f1e8269fbfd
    Time: 7436ms
                 Asset      Size  Chunks             Chunk Names
        main-client.js   30.7 kB       0  [emitted]  main-client
              site.css   1.56 kB       0  [emitted]  main-client
    main-client.js.map   40.8 kB       0  [emitted]  main-client
          site.css.map  85 bytes       0  [emitted]  main-client

    ERROR in [at-loader] ./ClientApp/boot-server.tsx:23:18 
        TS2604: JSX element type 'StaticRouter' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:9:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:10:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:11:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:40:35 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:46:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:56:31 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:74:28 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:79:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:87:35 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:92:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).
Child
    Hash: e6a114b21af4daf8a817
    Time: 7025ms
             Asset     Size  Chunks             Chunk Names
    main-server.js  77.3 kB       0  [emitted]  main-server

    ERROR in [at-loader] ./ClientApp/boot-server.tsx:23:18 
        TS2604: JSX element type 'StaticRouter' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:9:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:10:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./ClientApp/routes.tsx:11:6 
        TS2604: JSX element type 'Route' does not have any construct or call signatures.

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:40:35 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:46:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:56:31 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:74:28 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:79:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:87:35 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

    ERROR in [at-loader] ./node_modules/@types/react-router/index.d.ts:92:29 
        TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).
wenkangjing commented 7 years ago

Same here on Windows 10 + node v4 + typescript 2.3.4, tried following to walk around, but all failed:

eino-makitalo commented 7 years ago

Same me. I tried with dotnet new reactredux dotnet restore npm install

And no hope same errors and it is when running webpack -> typescript ClientApp/boot-server.tsx(23,18): error TS2604: JSX element type 'StaticRouter' does not have any construct or call signatures. ClientApp/routes.tsx(9,6): error TS2604: JSX element type 'Route' does not have any construct or call signatures. ClientApp/routes.tsx(10,6): error TS2604: JSX element type 'Route' does not have any construct or call signatures. ClientApp/routes.tsx(11,6): error TS2604: JSX element type 'Route' does not have any construct or call signatures. node_modules/@types/react-router/index.d.ts(40,35): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(46,29): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(56,31): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(74,28): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(79,29): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(87,35): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s). node_modules/@types/react-router/index.d.ts(92,29): error TS2314: Generic type 'Component<P, S>' requires 2 type argument(s).

Easy to reproduce just follow basic path.

eino-makitalo commented 7 years ago

I found a workaround. I went offline and I compare packages of working version (before it's updated from network) with npm ls and found differences Non working version has @types/react-router version 4.0.12 and working one has 4.0.11

1) So delete directory node_modules/@types/react-router. 2) Add explicitely version to package.json 4.0.11 @types/react-router": "4.0.11", Started to work for me.

{
  "name": "x",
  "version": "0.0.0",
  "dependencies": {
    @types/react-router": "4.0.11",
    "@types/history": "4.5.1",
    "@types/react": "15.0.24",
    "@types/react-dom": "15.5.0",
    "@types/react-redux": "4.4.40",
    "@types/react-router-dom": "4.0.4",

Attached diff to working and nonworking versions... okvsfailed.txt

OlekRia commented 7 years ago

After router upgrade :) Beware to update webpack to 3.0.0 also!

eino-makitalo commented 7 years ago

Well in package.json there is version 2.5.1. I try to install global webpack to 3.00 and local one too It did not help for me. So better to force react-router to older version until this template is fixed?

OlekRia commented 7 years ago

@eino-makitalo No way to install webpack 3 ! I spent too many hours for nothing after it :)

eino-makitalo commented 7 years ago

I had globally webpack 3.00 but in node_modules there is just version 2.5.1. When I just change this @types/react-routerto older one (4.0.11) my compilation start to work. My suggestion is not to update webpack at all. @EmmaHansson I fix my comment because it has ate word @types/react-router,

eino-makitalo commented 7 years ago

@wenkangjing I managed to fix it with that but have to delete types/react-router version manually from node_modules to be able to go back earlier version as explained earlier When explicitely installing older version it satisfied react-router-dom (4.0.4) which normally would load newer version of react-router. This is nodejs hell! (compared to old days dll hell nothing has changed)

david-lennox commented 7 years ago

I had same problem and fixed it by adding the missing argument to classes in node_modules/@types/react-router and node_modules/@types/react-router-dom and node_modules/@types/react-router-redux. E.g. change export class Route extends React.Component<RouteProps> { } to export class Route extends React.Component<RouteProps, {}> { }

SteveSandersonMS commented 7 years ago

Thanks for reporting this. It's a really nasty mess! The basic issue is:

  1. ReactReduxSpa pins to exact versions of some, but not all, of its dependencies. Thus it trusts that dependencies accurately describe their own compatibility with other dependencies via semver.
  2. The @types packages do not accurately describe their own compatibility with other dependencies via semver. When one @types depends on another, it just specifies version * which gives a totally untrue view of compatibility.

In this particular case, the newly-released @types/react-router 4.0.12 is not compatible with @types/react v15.0.29 (despite claiming to be compatible with version *, i.e., all versions).

To fix this, there are two solutions we'll add:

Besides all this, there's a strong case that the @types project should respect semver in its packages. The @types packages shouldn't claim to be compatible with version * of other @types packages when they are not. I'll file an issue with them about that, though I expect it's something that's been reported in the past already!

wenkangjing commented 7 years ago

Thanks @eino-makitalo, tried your solution but still no luck, end up with other errors after explicitly changing to @types/react-router to 4.0.11, and downgrade @types/react-router-dom to 4.0.4. Sign...spent 4 hours on this...

ERROR in [at-loader] ./ClientApp/components/FetchData.tsx:63:13
        TS2605: JSX element type 'Link' is not a constructor function for JSX elements.
    ERROR in [at-loader] ./ClientApp/components/NavMenu.tsx:15:21
        TS2605: JSX element type 'Link' is not a constructor function for JSX elements.
      Types of property 'setState' are incompatible.
        Type '{ <K extends never>(f: (prevState: void, props: LinkProps) => Pick<void, K>, callback?: () => any...' is not assignable to type '{ <K extends never>(f: (prevState: {}, props: any) => Pick<{}, K>, callback?: () => any): void; <...'.
          Types of parameters 'f' and 'f' are incompatible.
            Type '(prevState: {}, props: any) => Pick<{}, any>' is not assignable to type '(prevState: void, props: LinkProps) => Pick<void, any>'.
              Types of parameters 'prevState' and 'prevState' are incompatible.
                Type 'void' is not assignable to type '{}'.