How to solve react webpack problem with npm-start
Here is my error page:
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"webpack": "4.19.1"
Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:
C:UsersAcernode_moduleswebpack (version: 4.28.3)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
- Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
- Delete node_modules in your project folder.
- Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
- Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if C:UsersAcernode_moduleswebpack is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls webpack in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log
I've applied all steps but, npm start command still doesn't work.
What should I do?
reactjs npm webpack
add a comment |
Here is my error page:
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"webpack": "4.19.1"
Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:
C:UsersAcernode_moduleswebpack (version: 4.28.3)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
- Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
- Delete node_modules in your project folder.
- Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
- Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if C:UsersAcernode_moduleswebpack is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls webpack in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log
I've applied all steps but, npm start command still doesn't work.
What should I do?
reactjs npm webpack
1
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14
add a comment |
Here is my error page:
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"webpack": "4.19.1"
Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:
C:UsersAcernode_moduleswebpack (version: 4.28.3)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
- Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
- Delete node_modules in your project folder.
- Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
- Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if C:UsersAcernode_moduleswebpack is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls webpack in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log
I've applied all steps but, npm start command still doesn't work.
What should I do?
reactjs npm webpack
Here is my error page:
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"webpack": "4.19.1"
Don't try to install it manually: your package manager does it
automatically. However, a different version of webpack was detected
higher up in the tree:
C:UsersAcernode_moduleswebpack (version: 4.28.3)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
- Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
- Delete node_modules in your project folder.
- Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.
- Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if C:UsersAcernode_moduleswebpack is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls webpack in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed webpack.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! first-app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the first-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAcerAppDataRoamingnpm-cache_logs2019-01-03T12_30_23_160Z-debug.log
I've applied all steps but, npm start command still doesn't work.
What should I do?
reactjs npm webpack
reactjs npm webpack
edited Jan 3 at 13:32
RobC
6,68392741
6,68392741
asked Jan 3 at 12:34
efeozkesiciefeozkesici
11
11
1
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14
add a comment |
1
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14
1
1
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14
add a comment |
2 Answers
2
active
oldest
votes
I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.
So, I deleted my C:UsersAcernode_modules
folder and npm start
worked for me !!
add a comment |
I have the same error !
I think i might have installed some previous version of webpack and can't get rid off!
i picked up my friends computer and installed react as these commands
npm install create-react-app -g
create-react-app newappname
then after some time
npm start
and it opened in browser, it worked like that.
How to uninstall npm modules in node js?
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%2f54022392%2fhow-to-solve-react-webpack-problem-with-npm-start%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.
So, I deleted my C:UsersAcernode_modules
folder and npm start
worked for me !!
add a comment |
I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.
So, I deleted my C:UsersAcernode_modules
folder and npm start
worked for me !!
add a comment |
I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.
So, I deleted my C:UsersAcernode_modules
folder and npm start
worked for me !!
I got the solution! Focus on the point 6: it asks to delete node_modules folder outside your project directory.
So, I deleted my C:UsersAcernode_modules
folder and npm start
worked for me !!
edited Mar 20 at 7:31
Multihunter
2,0151920
2,0151920
answered Mar 20 at 5:34
jino cjjino cj
213
213
add a comment |
add a comment |
I have the same error !
I think i might have installed some previous version of webpack and can't get rid off!
i picked up my friends computer and installed react as these commands
npm install create-react-app -g
create-react-app newappname
then after some time
npm start
and it opened in browser, it worked like that.
How to uninstall npm modules in node js?
add a comment |
I have the same error !
I think i might have installed some previous version of webpack and can't get rid off!
i picked up my friends computer and installed react as these commands
npm install create-react-app -g
create-react-app newappname
then after some time
npm start
and it opened in browser, it worked like that.
How to uninstall npm modules in node js?
add a comment |
I have the same error !
I think i might have installed some previous version of webpack and can't get rid off!
i picked up my friends computer and installed react as these commands
npm install create-react-app -g
create-react-app newappname
then after some time
npm start
and it opened in browser, it worked like that.
How to uninstall npm modules in node js?
I have the same error !
I think i might have installed some previous version of webpack and can't get rid off!
i picked up my friends computer and installed react as these commands
npm install create-react-app -g
create-react-app newappname
then after some time
npm start
and it opened in browser, it worked like that.
How to uninstall npm modules in node js?
edited Feb 13 at 21:48
Edgar Ortega
8001015
8001015
answered Feb 13 at 20:57
Sikander NawazSikander Nawaz
11
11
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%2f54022392%2fhow-to-solve-react-webpack-problem-with-npm-start%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
Welcome to stackoverflow. Please read : stackoverflow.com/help/on-topic, stackoverflow.com/help/how-to-ask and stackoverflow.com/help/dont-ask. You may need to format your question a little bit highlighting what is the exact problem and what you are expecting.
– Soumya Kanti
Jan 3 at 13:05
Have you tried what's suggested here.
– RobC
Jan 3 at 13:39
stackoverflow.com/questions/13066532/… I just solved it using instructions on this link !
– Sikander Nawaz
Feb 13 at 21:14