Syntax error on vm.js when running react app
up vote
0
down vote
favorite
I created a basic react-app with "npm install -g create-react-app" and then "create-react-app my-app".
After entering "npm start" into my command line, the localhost view is still available, but runninmg the app.js in Visual Studio Code leads to that error:
C:Program Filesnodejsnode.exe --inspect-brk=37970 srcApp.js
Debugger listening on ws://127.0.0.1:37970/b058e445-c99e-4b27-bb5d-
3477c4edc040
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
c:Users......srcApp.js:1
(function (exports, require, module, __filename, __dirname) { import React,
{ Component } from 'react';
^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
So, my new app is just a default app, which leads me to believe that something is not adjusted the right way on my computer system.
Before I tried to run a default app, I created another app with a little content, which was running first, but then after submitting it to git and github and restarting the computer it didn't work anymore, with exactly the same error message. That app, after entering "npm start", wouldn't even cause the localhost to start.
Does anyone of you have an idea what could cause this problem?
I appreciate any hint.
Thank you!
javascript reactjs npm create-react-app
New contributor
add a comment |
up vote
0
down vote
favorite
I created a basic react-app with "npm install -g create-react-app" and then "create-react-app my-app".
After entering "npm start" into my command line, the localhost view is still available, but runninmg the app.js in Visual Studio Code leads to that error:
C:Program Filesnodejsnode.exe --inspect-brk=37970 srcApp.js
Debugger listening on ws://127.0.0.1:37970/b058e445-c99e-4b27-bb5d-
3477c4edc040
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
c:Users......srcApp.js:1
(function (exports, require, module, __filename, __dirname) { import React,
{ Component } from 'react';
^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
So, my new app is just a default app, which leads me to believe that something is not adjusted the right way on my computer system.
Before I tried to run a default app, I created another app with a little content, which was running first, but then after submitting it to git and github and restarting the computer it didn't work anymore, with exactly the same error message. That app, after entering "npm start", wouldn't even cause the localhost to start.
Does anyone of you have an idea what could cause this problem?
I appreciate any hint.
Thank you!
javascript reactjs npm create-react-app
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I created a basic react-app with "npm install -g create-react-app" and then "create-react-app my-app".
After entering "npm start" into my command line, the localhost view is still available, but runninmg the app.js in Visual Studio Code leads to that error:
C:Program Filesnodejsnode.exe --inspect-brk=37970 srcApp.js
Debugger listening on ws://127.0.0.1:37970/b058e445-c99e-4b27-bb5d-
3477c4edc040
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
c:Users......srcApp.js:1
(function (exports, require, module, __filename, __dirname) { import React,
{ Component } from 'react';
^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
So, my new app is just a default app, which leads me to believe that something is not adjusted the right way on my computer system.
Before I tried to run a default app, I created another app with a little content, which was running first, but then after submitting it to git and github and restarting the computer it didn't work anymore, with exactly the same error message. That app, after entering "npm start", wouldn't even cause the localhost to start.
Does anyone of you have an idea what could cause this problem?
I appreciate any hint.
Thank you!
javascript reactjs npm create-react-app
New contributor
I created a basic react-app with "npm install -g create-react-app" and then "create-react-app my-app".
After entering "npm start" into my command line, the localhost view is still available, but runninmg the app.js in Visual Studio Code leads to that error:
C:Program Filesnodejsnode.exe --inspect-brk=37970 srcApp.js
Debugger listening on ws://127.0.0.1:37970/b058e445-c99e-4b27-bb5d-
3477c4edc040
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
c:Users......srcApp.js:1
(function (exports, require, module, __filename, __dirname) { import React,
{ Component } from 'react';
^^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
So, my new app is just a default app, which leads me to believe that something is not adjusted the right way on my computer system.
Before I tried to run a default app, I created another app with a little content, which was running first, but then after submitting it to git and github and restarting the computer it didn't work anymore, with exactly the same error message. That app, after entering "npm start", wouldn't even cause the localhost to start.
Does anyone of you have an idea what could cause this problem?
I appreciate any hint.
Thank you!
javascript reactjs npm create-react-app
javascript reactjs npm create-react-app
New contributor
New contributor
New contributor
asked Nov 21 at 12:41
mats
1
1
New contributor
New contributor
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
mats is a new contributor. Be nice, and check out our Code of Conduct.
mats is a new contributor. Be nice, and check out our Code of Conduct.
mats is a new contributor. Be nice, and check out our Code of Conduct.
mats is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412258%2fsyntax-error-on-vm-js-when-running-react-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown