react: unable to import React from 'react'
After upgrading to webstrom 2019.1 I was unable to run or debug any apps or module. The first thing that pops up is this error message:
/src/button.js:1
(function (exports, require, module, __filename, __dirname) { import React 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:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
starting an app or module from terminal with npm start works just fine.
Has someone any ideas why this error comes up while in the previous verson I had not this problem.
Please sign in to leave a comment.
what run configuration do you use to start it? please provide a screenshot of console with this error message (make sure that the whole console panel is visible in screenshot, not just the error, so that I can see the command line)