How to fix 'Cannot find module 'babel-types'Cannot find module '@babel/core'Getting an error when using babel to convert react jsx codeWebpack hot module replacement not working with babel-loader and preset es2015Cannot configure webpack 2.2.1 correctly, keep throwing WebpackOptionsValidationErrorWebpack “start”: “webpack-dev-server --config=config/webpack.dev.js”, not workingSupport for the experimental syntax 'classProperties' isn't currently enabledModule build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'how to solve babel dependencies?A question in React+TypeScript+WebPack with typings-for-css-modules-loaderReactJS: unexpected token '<'Cannot find module 'webpack'
Good examples of "two is easy, three is hard" in computational sciences
Why is python script running in background consuming 100 % CPU?
Why does the U.S military use mercenaries?
If you attack a Tarrasque while swallowed, what AC do you need to beat to hit it?
What does this 'x' mean on the stem of the voice's note, above the notehead?
How can I prevent Bash expansion from passing files starting with "-" as argument?
Can a problematic AL DM/organizer prevent me from running a separatate AL-legal game at the same store?
How to safely discharge oneself
In Dutch history two people are referred to as "William III"; are there any more cases where this happens?
Why does string strummed with finger sound different from the one strummed with pick?
What should I wear to go and sign an employment contract?
pwaS eht tirsf dna tasl setterl fo hace dorw
Cycling to work - 30mile return
Translating a shape 3 times: What is a smarter way to code?
How to implement array type route in Laravel?
Richard's Favourite TV Programme
How fast do Drogon, Viserion and Rhaegal grow compared to the dragons of the past?
Why were early aviators' trousers so flared at the thigh?
Very serious stuff - Salesforce bug enabled "Modify All"
Can an airline pilot be prosecuted for killing an unruly passenger who could not be physically restrained?
How come Arya Stark wasn't hurt by this in Game of Thrones Season 8 Episode 5?
Why is Drogon so much better in battle than Rhaegal and Viserion?
Difference between consistency and satisfiability
Why won't the U.S. be a signatory nation of The United Nations Convention on the Law of the Sea?
How to fix 'Cannot find module 'babel-types'
Cannot find module '@babel/core'Getting an error when using babel to convert react jsx codeWebpack hot module replacement not working with babel-loader and preset es2015Cannot configure webpack 2.2.1 correctly, keep throwing WebpackOptionsValidationErrorWebpack “start”: “webpack-dev-server --config=config/webpack.dev.js”, not workingSupport for the experimental syntax 'classProperties' isn't currently enabledModule build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'how to solve babel dependencies?A question in React+TypeScript+WebPack with typings-for-css-modules-loaderReactJS: unexpected token '<'Cannot find module 'webpack'
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm trying to setup react with babel and following this video https://www.youtube.com/watch?v=deyxI-6C2u4. However I get that error when using npm start
I followed step by step the video. Then changed the babel-babel-plugins with @babel-babel-plugins except babel-loader, and changed .babelrc. Also add a new React component, but tried without including it and still gave me error.
./package.json
"scripts":
"start": "webpack-dev-server --mode development --open --hot",
"build": "webpack --mode production"
,
"devDependencies":
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1"
./.babelrc
"presets": ["@babel/preset-env","@babel/preset-react"]
./src/index.html
<body>
<div id="root"></div>
</body>
./src/Components/App.js
import React, Component from 'react';
import HeroeClasses from './HeroeClasses';
const classList = ["Warrior", "Mage", "Hunter","Paladin","Druid","Shaman","Rogue","Warlock","Priest","DeathKnight"];
class App extends Component
render()
return(
<div>
<HeroeClasses classes=classList heroeNumber="first"/>
</div>
)
export default App;
./src/Components/HeroeClasses.js
import React, Component from 'react';
class HeroeMenu extends Component
render()
return (
<div className=`HeroMenu $heroeNumber`>
<ul>
classes.map(element =>
return (<li type="radio" class=`heroClass_$heroeNumber` name=`heroClass_$heroeNumber` id=`$element_$heroeNumber`>
<label for=`$element_$heroeNumber`>
element
</label>
</li>)
)
</ul>
</div>
)
HeroeMenu.defaultProps =
classes: ['Warrior, Mage'],
heroeNumber: first
;
export default HeroeClasses;
** Error Message **
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightssrcindex.js: Cannot find module 'babel-types' (While processing: "D:\Users\josea\Documents\Jose\Proyectos\It_as_a_hobby\code\randomFights\node_modules\@babel\preset-env\lib\index.js$20")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightsnode_modulesregenerator-transformlibvisit.js:17:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
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)
@ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]
Thanks in advance for your time :D
reactjs webpack babel
add a comment |
I'm trying to setup react with babel and following this video https://www.youtube.com/watch?v=deyxI-6C2u4. However I get that error when using npm start
I followed step by step the video. Then changed the babel-babel-plugins with @babel-babel-plugins except babel-loader, and changed .babelrc. Also add a new React component, but tried without including it and still gave me error.
./package.json
"scripts":
"start": "webpack-dev-server --mode development --open --hot",
"build": "webpack --mode production"
,
"devDependencies":
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1"
./.babelrc
"presets": ["@babel/preset-env","@babel/preset-react"]
./src/index.html
<body>
<div id="root"></div>
</body>
./src/Components/App.js
import React, Component from 'react';
import HeroeClasses from './HeroeClasses';
const classList = ["Warrior", "Mage", "Hunter","Paladin","Druid","Shaman","Rogue","Warlock","Priest","DeathKnight"];
class App extends Component
render()
return(
<div>
<HeroeClasses classes=classList heroeNumber="first"/>
</div>
)
export default App;
./src/Components/HeroeClasses.js
import React, Component from 'react';
class HeroeMenu extends Component
render()
return (
<div className=`HeroMenu $heroeNumber`>
<ul>
classes.map(element =>
return (<li type="radio" class=`heroClass_$heroeNumber` name=`heroClass_$heroeNumber` id=`$element_$heroeNumber`>
<label for=`$element_$heroeNumber`>
element
</label>
</li>)
)
</ul>
</div>
)
HeroeMenu.defaultProps =
classes: ['Warrior, Mage'],
heroeNumber: first
;
export default HeroeClasses;
** Error Message **
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightssrcindex.js: Cannot find module 'babel-types' (While processing: "D:\Users\josea\Documents\Jose\Proyectos\It_as_a_hobby\code\randomFights\node_modules\@babel\preset-env\lib\index.js$20")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightsnode_modulesregenerator-transformlibvisit.js:17:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
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)
@ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]
Thanks in advance for your time :D
reactjs webpack babel
add a comment |
I'm trying to setup react with babel and following this video https://www.youtube.com/watch?v=deyxI-6C2u4. However I get that error when using npm start
I followed step by step the video. Then changed the babel-babel-plugins with @babel-babel-plugins except babel-loader, and changed .babelrc. Also add a new React component, but tried without including it and still gave me error.
./package.json
"scripts":
"start": "webpack-dev-server --mode development --open --hot",
"build": "webpack --mode production"
,
"devDependencies":
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1"
./.babelrc
"presets": ["@babel/preset-env","@babel/preset-react"]
./src/index.html
<body>
<div id="root"></div>
</body>
./src/Components/App.js
import React, Component from 'react';
import HeroeClasses from './HeroeClasses';
const classList = ["Warrior", "Mage", "Hunter","Paladin","Druid","Shaman","Rogue","Warlock","Priest","DeathKnight"];
class App extends Component
render()
return(
<div>
<HeroeClasses classes=classList heroeNumber="first"/>
</div>
)
export default App;
./src/Components/HeroeClasses.js
import React, Component from 'react';
class HeroeMenu extends Component
render()
return (
<div className=`HeroMenu $heroeNumber`>
<ul>
classes.map(element =>
return (<li type="radio" class=`heroClass_$heroeNumber` name=`heroClass_$heroeNumber` id=`$element_$heroeNumber`>
<label for=`$element_$heroeNumber`>
element
</label>
</li>)
)
</ul>
</div>
)
HeroeMenu.defaultProps =
classes: ['Warrior, Mage'],
heroeNumber: first
;
export default HeroeClasses;
** Error Message **
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightssrcindex.js: Cannot find module 'babel-types' (While processing: "D:\Users\josea\Documents\Jose\Proyectos\It_as_a_hobby\code\randomFights\node_modules\@babel\preset-env\lib\index.js$20")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightsnode_modulesregenerator-transformlibvisit.js:17:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
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)
@ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]
Thanks in advance for your time :D
reactjs webpack babel
I'm trying to setup react with babel and following this video https://www.youtube.com/watch?v=deyxI-6C2u4. However I get that error when using npm start
I followed step by step the video. Then changed the babel-babel-plugins with @babel-babel-plugins except babel-loader, and changed .babelrc. Also add a new React component, but tried without including it and still gave me error.
./package.json
"scripts":
"start": "webpack-dev-server --mode development --open --hot",
"build": "webpack --mode production"
,
"devDependencies":
"@babel/core": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.5",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1"
./.babelrc
"presets": ["@babel/preset-env","@babel/preset-react"]
./src/index.html
<body>
<div id="root"></div>
</body>
./src/Components/App.js
import React, Component from 'react';
import HeroeClasses from './HeroeClasses';
const classList = ["Warrior", "Mage", "Hunter","Paladin","Druid","Shaman","Rogue","Warlock","Priest","DeathKnight"];
class App extends Component
render()
return(
<div>
<HeroeClasses classes=classList heroeNumber="first"/>
</div>
)
export default App;
./src/Components/HeroeClasses.js
import React, Component from 'react';
class HeroeMenu extends Component
render()
return (
<div className=`HeroMenu $heroeNumber`>
<ul>
classes.map(element =>
return (<li type="radio" class=`heroClass_$heroeNumber` name=`heroClass_$heroeNumber` id=`$element_$heroeNumber`>
<label for=`$element_$heroeNumber`>
element
</label>
</li>)
)
</ul>
</div>
)
HeroeMenu.defaultProps =
classes: ['Warrior, Mage'],
heroeNumber: first
;
export default HeroeClasses;
** Error Message **
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightssrcindex.js: Cannot find module 'babel-types' (While processing: "D:\Users\josea\Documents\Jose\Proyectos\It_as_a_hobby\code\randomFights\node_modules\@babel\preset-env\lib\index.js$20")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:UsersjoseaDocumentsJoseProyectosIt_as_a_hobbycoderandomFightsnode_modulesregenerator-transformlibvisit.js:17:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
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)
@ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]
Thanks in advance for your time :D
reactjs webpack babel
reactjs webpack babel
asked Mar 23 at 18:10
itasahobbyitasahobby
84
84
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Mind starting again all over? I followed this same video earlier today and had no problem except where I had to change how babel is written. Check out this
answer.
Edit:
And should you add react router to your application you might likely get a 404 when you reload a page, This helped me
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2f55316868%2fhow-to-fix-cannot-find-module-babel-types%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Mind starting again all over? I followed this same video earlier today and had no problem except where I had to change how babel is written. Check out this
answer.
Edit:
And should you add react router to your application you might likely get a 404 when you reload a page, This helped me
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
add a comment |
Mind starting again all over? I followed this same video earlier today and had no problem except where I had to change how babel is written. Check out this
answer.
Edit:
And should you add react router to your application you might likely get a 404 when you reload a page, This helped me
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
add a comment |
Mind starting again all over? I followed this same video earlier today and had no problem except where I had to change how babel is written. Check out this
answer.
Edit:
And should you add react router to your application you might likely get a 404 when you reload a page, This helped me
Mind starting again all over? I followed this same video earlier today and had no problem except where I had to change how babel is written. Check out this
answer.
Edit:
And should you add react router to your application you might likely get a 404 when you reload a page, This helped me
edited Mar 26 at 1:58
answered Mar 23 at 20:32
HoxtygenHoxtygen
264
264
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
add a comment |
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
Gonna start from scratch, let's see if it works this time, thanks :D
– itasahobby
Mar 23 at 21:43
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f55316868%2fhow-to-fix-cannot-find-module-babel-types%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