-
Notifications
You must be signed in to change notification settings - Fork 517
Got the error when run the MusicStore samples #583
Description
Sorry for my stupid question, but I try to run the MusicStore sample, but it throws an exception. I describe it as below
I followed the guidance at README file to run the sample. After run dotnet restore
at the root folder. I moved to Music Store folder, run npm install
and tried to run dotnet run
, it started successfully, but after I typed http://localhost:5000 on the browser, it threw this exception
System.Exception: Call to Node module failed with error: Error: Webpack compilation reported errors. Compiler output follows: Hash: f15994f6102485cd04e2
Version: webpack 1.14.0
Time: 5377ms
Asset Size Chunks Chunk Names
webpack-output.js 112 kB 0 [emitted] mainERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\typescript\lib\lib.es6.d.ts
(13274,11): error TS2300: Duplicate identifier 'History'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\typescript\lib\lib.es6.d.ts
(13284,13): error TS2300: Duplicate identifier 'History'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router-redux\node_modules@types\history\index.d.ts
(6,21): error TS2300: Duplicate identifier 'History'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\createMemoryHistory.d.ts
(3,57): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\useRouterHistory.d.ts
(1,19): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'HistoryOptions'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\useRouterHistory.d.ts
(1,35): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\useRouterHistory.d.ts
(1,51): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'CreateHistory'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\useRoutes.d.ts
(4,48): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'CreateHistory'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\useRoutes.d.ts
(4,69): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'CreateHistory'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\routerHistory.d.ts
(10,46): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\routerHistory.d.ts
(20,39): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'HistoryQueries'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\Redirect.d.ts
(14,19): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\IndexRedirect.d.ts
(12,16): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\Router.d.ts
(4,5): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'QueryString'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\Router.d.ts
(4,18): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index"' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\Router.d.ts
(112,56): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index".History' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\react-router\lib\Router.d.ts
(113,56): error TS2305: Module '"C:/Users/projects/github/JavaScriptServices/samples/react/MusicStore/node_modules/@types/history/index".History' has no exported member 'Query'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules@types\history\index.d.ts
(5,21): error TS2300: Duplicate identifier 'History'.ERROR in ./ReactApp/configureStore.ts
(19,75): error TS2503: Cannot find namespace 'Redux'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\ReactApp\boot.tsx
(22,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.ERROR in C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\ReactApp\boot.tsx
(22,17): error TS2322: Type 'ReactRouterReduxHistory' is not assignable to type 'History'.
Property 'length' is missing in type 'ReactRouterReduxHistory'.ERROR in ./ReactApp/boot-server.tsx
(5,33): error TS2307: Cannot find module 'history/lib/createMemoryHistory'.
at C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\aspnet-webpack\LoadViaWebpack.js:111:31
at Compiler. (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:194:14)
at Compiler.emitRecords (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:282:37)
at Compiler. (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:187:11)
at C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:275:11
at Compiler.applyPluginsAsync (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\tapable\lib\Tapable.js:60:69)
at Compiler.afterEmit (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:272:8)
at Compiler. (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:267:14)
at C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\async\lib\async.js:52:16
at Object.async.forEachOf.async.eachOf (C:\Users\projects\github\JavaScriptServices\samples\react\MusicStore\node_modules\async\lib\async.js:236:30)
at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.d__71.MoveNext() in C:\Users\projects\github\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices\HostingModels\HttpNodeInstance.cs:line 73 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.d__131.MoveNext() in C:\Users\projects\github\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices\HostingModels\OutOfProcessNodeInstance.cs:line 136 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.d__101.MoveNext() in C:\Users\projects\github\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices\NodeServicesImpl.cs:line 60 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at Microsoft.AspNetCore.SpaServices.Prerendering.PrerenderTagHelper.d__33.MoveNext() in C:\Users\projects\github\JavaScriptServices\src\Microsoft.AspNetCore.SpaServices\Prerendering\PrerenderTagHelper.cs:line 109
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at AspNetCore._Views_Home_Index_cshtml.d__29.MoveNext() in /Views/Home/Index.cshtml:line 2
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewResult.d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.d__7.MoveNext()
I use Windows 10 Professional. Could anyone tell me how to fix it?