react/MusicStore: SyntaxError: Unexpected token import #1238

Closed
opened 2025-08-09 17:19:23 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @cveld on 11/23/2016

When trying out the react/MusicStore example I get the following exception after browsing to http://localhost:5000:

An unhandled exception occurred while processing the request.

Exception: Call to Node module failed with error: c:\examples\JavaScriptServices\samples\react\MusicStore\ReactApp\boot-server.js:138
import { fetch, addTask } from 'domain-task';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:78:16)
at Module._compile (module.js:545:28)
at requireFromString (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\require-from-string\index.js:27:4)
at c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\aspnet-webpack\LoadViaWebpack.js:119:42
at Compiler.<anonymous> (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:194:14)
at Compiler.emitRecords (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:282:37)
at Compiler.<anonymous> (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:187:11)
at c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:275:11
at Compiler.applyPluginsAsync (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\tapable\lib\Tapable.js:60:69)
at Compiler.afterEmit (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:272:8)

I am using commit e3a4fad dated 14 November 2016 16:51:42.

Node -v
v7.1.0

How can I simulate the same behavior from the command-line without having to kick off dotnet run?
How can I fix the issue?

*Originally created by @cveld on 11/23/2016* When trying out the react/MusicStore example I get the following exception after browsing to `http://localhost:5000`: ``` An unhandled exception occurred while processing the request. Exception: Call to Node module failed with error: c:\examples\JavaScriptServices\samples\react\MusicStore\ReactApp\boot-server.js:138 import { fetch, addTask } from 'domain-task'; ^^^^^^ SyntaxError: Unexpected token import at Object.exports.runInThisContext (vm.js:78:16) at Module._compile (module.js:545:28) at requireFromString (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\require-from-string\index.js:27:4) at c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\aspnet-webpack\LoadViaWebpack.js:119:42 at Compiler.<anonymous> (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:194:14) at Compiler.emitRecords (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:282:37) at Compiler.<anonymous> (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:187:11) at c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:275:11 at Compiler.applyPluginsAsync (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\tapable\lib\Tapable.js:60:69) at Compiler.afterEmit (c:\examples\JavaScriptServices\samples\react\MusicStore\node_modules\webpack\lib\Compiler.js:272:8) ``` I am using commit e3a4fad dated 14 November 2016 16:51:42. Node -v v7.1.0 How can I simulate the same behavior from the command-line without having to kick off `dotnet run`? How can I fix the issue?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1238
No description provided.