This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
React with Redux show many errors when creating #582
Copy link
Copy link
Closed
Description
It is normal that this happens?
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.17
npm WARN ReactRedux@0.0.0 No description
npm WARN ReactRedux@0.0.0 No repository field.
npm WARN ReactRedux@0.0.0 No license field.
log : Restoring packages for z:\projects\temp\ReactRedux\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in z:\projects\temp\ReactRedux\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in z:\projects\temp\ReactRedux\project.json...
log : Restoring packages for tool 'Microsoft.DotNet.Watcher.Tools' in z:\projects\temp\ReactRedux\project.json...
log : Writing lock file to disk. Path: z:\projects\temp\ReactRedux\project.lock.json
log : z:\projects\temp\ReactRedux\project.json
log : Restore completed in 5476ms.
Hash: 9e03fe6cec5d8398598c3aab4069bb548ad173b3
Version: webpack 1.14.0
Child
Hash: 9e03fe6cec5d8398598c
Version: webpack 1.14.0
Time: 3651ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 1.73 MB 0 [emitted] vendor
vendor.css 315 kB 0 [emitted] vendor
[0] dll vendor 12 bytes {0} [built]
+ 374 hidden modules
WARNING in ./~/node-libs-browser/~/process/browser.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.
WARNING in Z:/projects/temp/ReactRedux/~/node-libs-browser/~/process/browser.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.
Child extract-text-webpack-plugin:
+ 7 hidden modules
Child
Hash: 3aab4069bb548ad173b3
Version: webpack 1.14.0
Time: 3638ms
Asset Size Chunks Chunk Names
89889688147bd7575d6327160d64e760.svg 109 kB [emitted]
vendor.js 1.97 MB 0 [emitted] vendor
[0] dll vendor 12 bytes {0} [built]
+ 352 hidden modules
Hash: fc566f2f18fd46265e2059f70807ccc31b057bb8
Version: webpack 1.14.0
Child
Hash: fc566f2f18fd46265e20
Version: webpack 1.14.0
Time: 4003ms
Asset Size Chunks Chunk Names
main-client.js 43.4 kB 0 [emitted] main-client
site.css 1.56 kB 0 [emitted] main-client
main-client.js.map 30.3 kB 0 [emitted] main-client
site.css.map 85 bytes 0 [emitted] main-client
+ 23 hidden modules
ERROR in Z:\projects\temp\ReactRedux\node_modules\typescript\lib\lib.dom.d.ts
(7552,11): error TS2300: Duplicate identifier 'History'.
ERROR in Z:\projects\temp\ReactRedux\node_modules\typescript\lib\lib.dom.d.ts
(7562,13): error TS2300: Duplicate identifier 'History'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router-redux\node_modules\@types\history\index.d.ts
(6,21): error TS2300: Duplicate identifier 'History'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\createMemoryHistory.d.ts
(3,57): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,19): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,35): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,51): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRoutes.d.ts
(4,48): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRoutes.d.ts
(4,69): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\routerHistory.d.ts
(10,46): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\routerHistory.d.ts
(20,39): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Redirect.d.ts
(14,19): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\IndexRedirect.d.ts
(12,16): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(4,5): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'QueryString'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(4,18): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(112,56): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index".History' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(113,56): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index".History' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\history\index.d.ts
(5,21): error TS2300: Duplicate identifier 'History'.
ERROR in z:\projects\temp\ReactRedux\ClientApp\boot-server.tsx
(5,33): error TS2307: Cannot find module 'history/lib/createMemoryHistory'.
ERROR in ./ClientApp/boot-client.tsx
(21,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.
ERROR in ./ClientApp/boot-client.tsx
(21,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.
Property 'length' is missing in type 'ReactRouterReduxHistory'.
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child
Hash: 59f70807ccc31b057bb8
Version: webpack 1.14.0
Time: 3991ms
Asset Size Chunks Chunk Names
main-server.js 86.3 kB 0 [emitted] main-server
+ 21 hidden modules
ERROR in Z:\projects\temp\ReactRedux\node_modules\typescript\lib\lib.dom.d.ts
(7552,11): error TS2300: Duplicate identifier 'History'.
ERROR in Z:\projects\temp\ReactRedux\node_modules\typescript\lib\lib.dom.d.ts
(7562,13): error TS2300: Duplicate identifier 'History'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router-redux\node_modules\@types\history\index.d.ts
(6,21): error TS2300: Duplicate identifier 'History'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\createMemoryHistory.d.ts
(3,57): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,19): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,35): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRouterHistory.d.ts
(1,51): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRoutes.d.ts
(4,48): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\useRoutes.d.ts
(4,69): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'CreateHistory'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\routerHistory.d.ts
(10,46): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\routerHistory.d.ts
(20,39): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Redirect.d.ts
(14,19): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\IndexRedirect.d.ts
(12,16): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(4,5): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'QueryString'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(4,18): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index"' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(112,56): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index".History' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\react-router\lib\Router.d.ts
(113,56): error TS2305: Module '"z:/projects/temp/ReactRedux/node_modules/@types/history/index".History' has no exported member 'Query'.
ERROR in z:\projects\temp\ReactRedux\node_modules\@types\history\index.d.ts
(5,21): error TS2300: Duplicate identifier 'History'.
ERROR in ./ClientApp/boot-server.tsx
(5,33): error TS2307: Cannot find module 'history/lib/createMemoryHistory'.
ERROR in z:\projects\temp\ReactRedux\ClientApp\boot-client.tsx
(21,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.
ERROR in z:\projects\temp\ReactRedux\ClientApp\boot-client.tsx
(21,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.
Property 'length' is missing in type 'ReactRouterReduxHistory'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
baserz commentedon Jan 13, 2017
No thats not normal and i noticed it as well today when generating a new template after having updated yo & aspnetcore-spa generator.
I tried copying my old node_modules from a week old project (same package file), replacing the ones downloaded in the new project and the errors disappeared.
SapientGuardian commentedon Jan 15, 2017
I've also run into this. I had to make the following adjustments to my package.json to get things working again:
MarkPieszak commentedon Jan 15, 2017
I'm looking into it now, previously react-router-redux had some
typingsissues in it's declaration files. DefinitelyTyped/DefinitelyTyped#10686 (comment), which then the fixes got merged in DefinitelyTyped/DefinitelyTyped#13642 a few days ago.The template is using
"@types/react-router-redux": "^4.0.30", with^so it picks up the latest version.So the
History(@types/history) definition files had some serious updates recently: you can see them in this commit, DefinitelyTyped/DefinitelyTyped@a1abf4fSo although the react-redux-router types fixes would have helped, the 2 are now colliding.
@SapientGuardian is correct in that the types should be pinned for now.
Just made a PR for it here #586
davetemplin commentedon Jan 15, 2017
Hmm, just wondering if the the problem is in @types/react-router-redux or @types/react-router?
...got @types/history@2.0.45 as expected
...got @types/history@4.5.0, expected @types/history@2.0.45
Also noticed the following in the
package.jsonfor @types/react-router...Could another way to fix be to set
"@types/history": "~2.0.44"instead?Where are these dependent versions set for @types?
olafurw commentedon Jan 15, 2017
Yup I have the same issue, seems to be installing version 4.x.x, fixed temporarily on my end by adding
"@types/history": "^2.0.44"to my own dependency list.
Fix react/redux TypeScript build errors caused by breaking changes in…
SteveSandersonMS commentedon Jan 16, 2017
Thanks for reporting this. Fixed in f8714e9.
aleksfront commentedon Jan 16, 2017
@olafurw Thanks!
olafurw commentedon Jan 16, 2017
Anytime Chuck Norris.
mcquiggd commentedon Jan 16, 2017
@SteveSandersonMS
Quick question - will the published Yo generator be updated shortly with this fix, or do I have to be a bit more patient? ;) (Updated my copy just now but problem persists).
Edit:
Just copied the changed files from your commit f8714e9 into the relevant locations (on windows):
C:\Users\{Username}\AppData\Roaming\npm\node_modules\generator-aspnetcore-spa\app\templates\
All working - very happy 👍