Cannot find module '@babel/plugin-transform-react-jsx-source' when running React App
I have just created a React App with create-react-app aquastars
and then eject the dependencies using yarn run eject
and when I run the app I get the following error.
Cannot find module '@babel/plugin-transform-react-jsx-source'
I haven't done anything! What do I need to do to get this up and running? Any help would be appreciated.
javascript reactjs
add a comment |
I have just created a React App with create-react-app aquastars
and then eject the dependencies using yarn run eject
and when I run the app I get the following error.
Cannot find module '@babel/plugin-transform-react-jsx-source'
I haven't done anything! What do I need to do to get this up and running? Any help would be appreciated.
javascript reactjs
1
npm install
?
– connexo
Nov 15 '18 at 20:44
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10
add a comment |
I have just created a React App with create-react-app aquastars
and then eject the dependencies using yarn run eject
and when I run the app I get the following error.
Cannot find module '@babel/plugin-transform-react-jsx-source'
I haven't done anything! What do I need to do to get this up and running? Any help would be appreciated.
javascript reactjs
I have just created a React App with create-react-app aquastars
and then eject the dependencies using yarn run eject
and when I run the app I get the following error.
Cannot find module '@babel/plugin-transform-react-jsx-source'
I haven't done anything! What do I need to do to get this up and running? Any help would be appreciated.
javascript reactjs
javascript reactjs
asked Nov 15 '18 at 20:44
AltBrianAltBrian
330320
330320
1
npm install
?
– connexo
Nov 15 '18 at 20:44
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10
add a comment |
1
npm install
?
– connexo
Nov 15 '18 at 20:44
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10
1
1
npm install
?– connexo
Nov 15 '18 at 20:44
npm install
?– connexo
Nov 15 '18 at 20:44
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10
add a comment |
4 Answers
4
active
oldest
votes
I solve it!
after you executed 'npm run eject'
1.cd your project path (ignore)
2.rm -rf node_modules
3.npm install (don't use yarn )
npm run start success
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
add a comment |
The solution by @xiaobo was actually insufficient for me. It took me a while to figure this out after upgrading expo to v32, so here's what I did in case anyone else has the same problem. (Answer from expo forums.)
If you have a .babelrc
file in the root of your repository, re-name it to something like .babelrc-old
so it doesn't get used.
Add a file called babel.config.js
to the root of your repository.
Put this in the babel.config.js file:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
All set!
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
add a comment |
Delete the whole node_modules
and re-run yarn
to make it work.
rm -R node_modules/
rm yarn.lock
yarn install
add a comment |
Try to replace '@babel/plugin-transform-react-jsx-source' with '@babel/transform-react-jsx-source'
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%2f53327625%2fcannot-find-module-babel-plugin-transform-react-jsx-source-when-running-react%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I solve it!
after you executed 'npm run eject'
1.cd your project path (ignore)
2.rm -rf node_modules
3.npm install (don't use yarn )
npm run start success
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
add a comment |
I solve it!
after you executed 'npm run eject'
1.cd your project path (ignore)
2.rm -rf node_modules
3.npm install (don't use yarn )
npm run start success
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
add a comment |
I solve it!
after you executed 'npm run eject'
1.cd your project path (ignore)
2.rm -rf node_modules
3.npm install (don't use yarn )
npm run start success
I solve it!
after you executed 'npm run eject'
1.cd your project path (ignore)
2.rm -rf node_modules
3.npm install (don't use yarn )
npm run start success
answered Nov 30 '18 at 5:55
xiaoboxiaobo
27628
27628
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
add a comment |
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
2
2
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
Why not yarn in the 3rd step 🤔. I tried installing with yarn. It worked 😕
– user2925949
Feb 2 at 20:30
add a comment |
The solution by @xiaobo was actually insufficient for me. It took me a while to figure this out after upgrading expo to v32, so here's what I did in case anyone else has the same problem. (Answer from expo forums.)
If you have a .babelrc
file in the root of your repository, re-name it to something like .babelrc-old
so it doesn't get used.
Add a file called babel.config.js
to the root of your repository.
Put this in the babel.config.js file:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
All set!
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
add a comment |
The solution by @xiaobo was actually insufficient for me. It took me a while to figure this out after upgrading expo to v32, so here's what I did in case anyone else has the same problem. (Answer from expo forums.)
If you have a .babelrc
file in the root of your repository, re-name it to something like .babelrc-old
so it doesn't get used.
Add a file called babel.config.js
to the root of your repository.
Put this in the babel.config.js file:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
All set!
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
add a comment |
The solution by @xiaobo was actually insufficient for me. It took me a while to figure this out after upgrading expo to v32, so here's what I did in case anyone else has the same problem. (Answer from expo forums.)
If you have a .babelrc
file in the root of your repository, re-name it to something like .babelrc-old
so it doesn't get used.
Add a file called babel.config.js
to the root of your repository.
Put this in the babel.config.js file:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
All set!
The solution by @xiaobo was actually insufficient for me. It took me a while to figure this out after upgrading expo to v32, so here's what I did in case anyone else has the same problem. (Answer from expo forums.)
If you have a .babelrc
file in the root of your repository, re-name it to something like .babelrc-old
so it doesn't get used.
Add a file called babel.config.js
to the root of your repository.
Put this in the babel.config.js file:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
All set!
edited Feb 15 at 17:18
answered Jan 18 at 16:56
NandoNando
6113
6113
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
add a comment |
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Welcome to Stack Overflow! It looks like a good first answer, but please edit your post to remove the reference to "the answer above" because the answer order can change.
– A Jar of Clay
Jan 18 at 17:15
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Hey, got it, thanks so much for the tip! I just edited it to link to the actual answer.
– Nando
Feb 15 at 17:20
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
Thanks @Nando, you saved my day!
– Fl4v
Mar 9 at 20:47
add a comment |
Delete the whole node_modules
and re-run yarn
to make it work.
rm -R node_modules/
rm yarn.lock
yarn install
add a comment |
Delete the whole node_modules
and re-run yarn
to make it work.
rm -R node_modules/
rm yarn.lock
yarn install
add a comment |
Delete the whole node_modules
and re-run yarn
to make it work.
rm -R node_modules/
rm yarn.lock
yarn install
Delete the whole node_modules
and re-run yarn
to make it work.
rm -R node_modules/
rm yarn.lock
yarn install
answered Feb 5 at 10:22
RKMRKM
84
84
add a comment |
add a comment |
Try to replace '@babel/plugin-transform-react-jsx-source' with '@babel/transform-react-jsx-source'
add a comment |
Try to replace '@babel/plugin-transform-react-jsx-source' with '@babel/transform-react-jsx-source'
add a comment |
Try to replace '@babel/plugin-transform-react-jsx-source' with '@babel/transform-react-jsx-source'
Try to replace '@babel/plugin-transform-react-jsx-source' with '@babel/transform-react-jsx-source'
answered Feb 10 at 7:52
Risen humanRisen human
262
262
add a comment |
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%2f53327625%2fcannot-find-module-babel-plugin-transform-react-jsx-source-when-running-react%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
1
npm install
?– connexo
Nov 15 '18 at 20:44
Thanks connexo I am running that now.
– AltBrian
Nov 15 '18 at 20:46
same issue, how did you solve it?
– Adir Zoari
Nov 26 '18 at 10:10