npm run build does not update the react components
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
i have a react project with the following package.json :
{
"name": "commonsensev2.0",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost:9080/server/react",
"dependencies": {
"all": "0.0.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"chart.js": "^2.7.3",
"moment": "^2.23.0",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.1.5",
"popper.js": "^1.14.6",
"react": "^16.7.0",
"react-bootstrap": "^0.31.5",
"react-bootstrap-table": "^4.3.1",
"react-chartjs2": "^1.2.1",
"react-dom": "^16.7.0",
"react-localize-redux": "^2.17.5",
"react-moment": "^0.7.9",
"react-redux": "^5.1.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.0.14",
"redux": "^3.7.2"
},
"scripts": {
"build-css": "node-sass-chokidar src/sass/App.scss -o src/css/",
"watch-css": "npm run build-css && node-sass-chokidar src/sass/App.scss -o src/css/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"postbuild": "((ROBOCOPY build ../react /MIR) ^& if %ERRORLEVEL% lss 8 set ERRORLEVEL = 0)",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"bootstrap-toggle": "^2.2.2",
"datatables.net": "^1.10.19",
"numeral": "^2.0.6"
}
}
when i do npm run build i cannot see the changes on the html pages, i m using node 8.11.1 i downgraded it because i found somewhere that it maybe the reason why it does not work i'm also using "node-sass-chokidar": "0.0.3"
and the backend is a java server
node.js reactjs node-sass-chokidar
add a comment |
i have a react project with the following package.json :
{
"name": "commonsensev2.0",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost:9080/server/react",
"dependencies": {
"all": "0.0.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"chart.js": "^2.7.3",
"moment": "^2.23.0",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.1.5",
"popper.js": "^1.14.6",
"react": "^16.7.0",
"react-bootstrap": "^0.31.5",
"react-bootstrap-table": "^4.3.1",
"react-chartjs2": "^1.2.1",
"react-dom": "^16.7.0",
"react-localize-redux": "^2.17.5",
"react-moment": "^0.7.9",
"react-redux": "^5.1.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.0.14",
"redux": "^3.7.2"
},
"scripts": {
"build-css": "node-sass-chokidar src/sass/App.scss -o src/css/",
"watch-css": "npm run build-css && node-sass-chokidar src/sass/App.scss -o src/css/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"postbuild": "((ROBOCOPY build ../react /MIR) ^& if %ERRORLEVEL% lss 8 set ERRORLEVEL = 0)",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"bootstrap-toggle": "^2.2.2",
"datatables.net": "^1.10.19",
"numeral": "^2.0.6"
}
}
when i do npm run build i cannot see the changes on the html pages, i m using node 8.11.1 i downgraded it because i found somewhere that it maybe the reason why it does not work i'm also using "node-sass-chokidar": "0.0.3"
and the backend is a java server
node.js reactjs node-sass-chokidar
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
Sorry I Expressed Wrong, I usenpm sass
to compile scss to css and then import the css direct into root Example:"sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs rootimport '../styles/css/component.css'
– JustCase
Jan 3 at 14:57
add a comment |
i have a react project with the following package.json :
{
"name": "commonsensev2.0",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost:9080/server/react",
"dependencies": {
"all": "0.0.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"chart.js": "^2.7.3",
"moment": "^2.23.0",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.1.5",
"popper.js": "^1.14.6",
"react": "^16.7.0",
"react-bootstrap": "^0.31.5",
"react-bootstrap-table": "^4.3.1",
"react-chartjs2": "^1.2.1",
"react-dom": "^16.7.0",
"react-localize-redux": "^2.17.5",
"react-moment": "^0.7.9",
"react-redux": "^5.1.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.0.14",
"redux": "^3.7.2"
},
"scripts": {
"build-css": "node-sass-chokidar src/sass/App.scss -o src/css/",
"watch-css": "npm run build-css && node-sass-chokidar src/sass/App.scss -o src/css/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"postbuild": "((ROBOCOPY build ../react /MIR) ^& if %ERRORLEVEL% lss 8 set ERRORLEVEL = 0)",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"bootstrap-toggle": "^2.2.2",
"datatables.net": "^1.10.19",
"numeral": "^2.0.6"
}
}
when i do npm run build i cannot see the changes on the html pages, i m using node 8.11.1 i downgraded it because i found somewhere that it maybe the reason why it does not work i'm also using "node-sass-chokidar": "0.0.3"
and the backend is a java server
node.js reactjs node-sass-chokidar
i have a react project with the following package.json :
{
"name": "commonsensev2.0",
"version": "0.1.0",
"private": true,
"homepage": "http://localhost:9080/server/react",
"dependencies": {
"all": "0.0.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"chart.js": "^2.7.3",
"moment": "^2.23.0",
"node-sass-chokidar": "0.0.3",
"npm-run-all": "^4.1.5",
"popper.js": "^1.14.6",
"react": "^16.7.0",
"react-bootstrap": "^0.31.5",
"react-bootstrap-table": "^4.3.1",
"react-chartjs2": "^1.2.1",
"react-dom": "^16.7.0",
"react-localize-redux": "^2.17.5",
"react-moment": "^0.7.9",
"react-redux": "^5.1.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.0.14",
"redux": "^3.7.2"
},
"scripts": {
"build-css": "node-sass-chokidar src/sass/App.scss -o src/css/",
"watch-css": "npm run build-css && node-sass-chokidar src/sass/App.scss -o src/css/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"postbuild": "((ROBOCOPY build ../react /MIR) ^& if %ERRORLEVEL% lss 8 set ERRORLEVEL = 0)",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"bootstrap-toggle": "^2.2.2",
"datatables.net": "^1.10.19",
"numeral": "^2.0.6"
}
}
when i do npm run build i cannot see the changes on the html pages, i m using node 8.11.1 i downgraded it because i found somewhere that it maybe the reason why it does not work i'm also using "node-sass-chokidar": "0.0.3"
and the backend is a java server
node.js reactjs node-sass-chokidar
node.js reactjs node-sass-chokidar
asked Jan 3 at 14:22
hamzanhamzan
11
11
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
Sorry I Expressed Wrong, I usenpm sass
to compile scss to css and then import the css direct into root Example:"sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs rootimport '../styles/css/component.css'
– JustCase
Jan 3 at 14:57
add a comment |
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
Sorry I Expressed Wrong, I usenpm sass
to compile scss to css and then import the css direct into root Example:"sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs rootimport '../styles/css/component.css'
– JustCase
Jan 3 at 14:57
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
Sorry I Expressed Wrong, I use
npm sass
to compile scss to css and then import the css direct into root Example: "sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs root import '../styles/css/component.css'
– JustCase
Jan 3 at 14:57
Sorry I Expressed Wrong, I use
npm sass
to compile scss to css and then import the css direct into root Example: "sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs root import '../styles/css/component.css'
– JustCase
Jan 3 at 14:57
add a comment |
1 Answer
1
active
oldest
votes
Just a wild guess here but I think you are running the wrong command. Because build
is typically when you want to build code for a purpose like putting it on a server.
What you need to do is to npm run start
, as that has the watch
, that watches for changes and updates.
Just a minor thing, I would rename the start
script to dev
or serve
. Generally more used I would say.
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
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%2f54024181%2fnpm-run-build-does-not-update-the-react-components%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
Just a wild guess here but I think you are running the wrong command. Because build
is typically when you want to build code for a purpose like putting it on a server.
What you need to do is to npm run start
, as that has the watch
, that watches for changes and updates.
Just a minor thing, I would rename the start
script to dev
or serve
. Generally more used I would say.
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
add a comment |
Just a wild guess here but I think you are running the wrong command. Because build
is typically when you want to build code for a purpose like putting it on a server.
What you need to do is to npm run start
, as that has the watch
, that watches for changes and updates.
Just a minor thing, I would rename the start
script to dev
or serve
. Generally more used I would say.
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
add a comment |
Just a wild guess here but I think you are running the wrong command. Because build
is typically when you want to build code for a purpose like putting it on a server.
What you need to do is to npm run start
, as that has the watch
, that watches for changes and updates.
Just a minor thing, I would rename the start
script to dev
or serve
. Generally more used I would say.
Just a wild guess here but I think you are running the wrong command. Because build
is typically when you want to build code for a purpose like putting it on a server.
What you need to do is to npm run start
, as that has the watch
, that watches for changes and updates.
Just a minor thing, I would rename the start
script to dev
or serve
. Generally more used I would say.
answered Jan 3 at 15:55
Dejan.SDejan.S
8,172205693
8,172205693
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
add a comment |
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
well i'm building code for the purpose of putting it on a server, it's just when i do npm run build to generate updated versions of the css and js and html it does not chow those changes
– hamzan
Jan 3 at 19:10
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
@hamzan ok that is a different thing then the development I asked about before :). I had the same issue before I just need some time to refresh my memory about what I did.
– Dejan.S
Jan 4 at 8:27
much appreciated, take your time
– hamzan
Jan 4 at 13:49
much appreciated, take your time
– hamzan
Jan 4 at 13:49
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%2f54024181%2fnpm-run-build-does-not-update-the-react-components%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
Is it that your html does not update during development?
– Dejan.S
Jan 3 at 14:27
yes, exactly when i run npm run build nothing changes in the html content
– hamzan
Jan 3 at 14:29
Is Build-css generating .css? How do you import the css into the react? I do something similar, but I use sass.
– JustCase
Jan 3 at 14:36
@AndersonMendes i use also sass for the css import
– hamzan
Jan 3 at 14:40
Sorry I Expressed Wrong, I use
npm sass
to compile scss to css and then import the css direct into root Example:"sass:build": "sass --update src/styles/scss:src/styles/css"
in reactjs rootimport '../styles/css/component.css'
– JustCase
Jan 3 at 14:57