Node-sass on Docker : “environment has changed”
up vote
-1
down vote
favorite
I am here to ask your help concerning Docker and node-sass.
I know this problem has been discussed so many time but I didn't find any answer to my current situation...
Maybe someone could find where I am wrong...
my docker-compose.yml
app:
container_name: app
restart: always
build:
context: .
dockerfile: ./docker/dev/app
volumes:
- ./client:/usr/src/app
ports:
- "8081:8081"
environment:
- NODE_ENV=dev
- PORT=8081
my DockerFile used in the docker-compose
FROM node:9.8.0
WORKDIR /usr/src/app
COPY ./client/package*.json ./
RUN npm install
COPY . .
EXPOSE 8081
CMD ["npm", "start"]
my package.json "script start"
"watch": "webpack-dev-server --watch --inline --progress --config build/webpack.dev.conf.js",
When I am building it for production, I do not have any problem, but when I trying to set up an environment (using watch) for development, i got :
This usually happens because your environment has changed since running npm install.
dev_app | Run npm rebuild node-sass to download the binding for your current environment.
I have of course already try :
npm uninstall node-sass && install node-sass
npm rebuild node-sass
trying another Docker library (ex: alpine)...
But nothing... Does someone have any idea ? Thank for your help
docker node-sass
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
-1
down vote
favorite
I am here to ask your help concerning Docker and node-sass.
I know this problem has been discussed so many time but I didn't find any answer to my current situation...
Maybe someone could find where I am wrong...
my docker-compose.yml
app:
container_name: app
restart: always
build:
context: .
dockerfile: ./docker/dev/app
volumes:
- ./client:/usr/src/app
ports:
- "8081:8081"
environment:
- NODE_ENV=dev
- PORT=8081
my DockerFile used in the docker-compose
FROM node:9.8.0
WORKDIR /usr/src/app
COPY ./client/package*.json ./
RUN npm install
COPY . .
EXPOSE 8081
CMD ["npm", "start"]
my package.json "script start"
"watch": "webpack-dev-server --watch --inline --progress --config build/webpack.dev.conf.js",
When I am building it for production, I do not have any problem, but when I trying to set up an environment (using watch) for development, i got :
This usually happens because your environment has changed since running npm install.
dev_app | Run npm rebuild node-sass to download the binding for your current environment.
I have of course already try :
npm uninstall node-sass && install node-sass
npm rebuild node-sass
trying another Docker library (ex: alpine)...
But nothing... Does someone have any idea ? Thank for your help
docker node-sass
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I am here to ask your help concerning Docker and node-sass.
I know this problem has been discussed so many time but I didn't find any answer to my current situation...
Maybe someone could find where I am wrong...
my docker-compose.yml
app:
container_name: app
restart: always
build:
context: .
dockerfile: ./docker/dev/app
volumes:
- ./client:/usr/src/app
ports:
- "8081:8081"
environment:
- NODE_ENV=dev
- PORT=8081
my DockerFile used in the docker-compose
FROM node:9.8.0
WORKDIR /usr/src/app
COPY ./client/package*.json ./
RUN npm install
COPY . .
EXPOSE 8081
CMD ["npm", "start"]
my package.json "script start"
"watch": "webpack-dev-server --watch --inline --progress --config build/webpack.dev.conf.js",
When I am building it for production, I do not have any problem, but when I trying to set up an environment (using watch) for development, i got :
This usually happens because your environment has changed since running npm install.
dev_app | Run npm rebuild node-sass to download the binding for your current environment.
I have of course already try :
npm uninstall node-sass && install node-sass
npm rebuild node-sass
trying another Docker library (ex: alpine)...
But nothing... Does someone have any idea ? Thank for your help
docker node-sass
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am here to ask your help concerning Docker and node-sass.
I know this problem has been discussed so many time but I didn't find any answer to my current situation...
Maybe someone could find where I am wrong...
my docker-compose.yml
app:
container_name: app
restart: always
build:
context: .
dockerfile: ./docker/dev/app
volumes:
- ./client:/usr/src/app
ports:
- "8081:8081"
environment:
- NODE_ENV=dev
- PORT=8081
my DockerFile used in the docker-compose
FROM node:9.8.0
WORKDIR /usr/src/app
COPY ./client/package*.json ./
RUN npm install
COPY . .
EXPOSE 8081
CMD ["npm", "start"]
my package.json "script start"
"watch": "webpack-dev-server --watch --inline --progress --config build/webpack.dev.conf.js",
When I am building it for production, I do not have any problem, but when I trying to set up an environment (using watch) for development, i got :
This usually happens because your environment has changed since running npm install.
dev_app | Run npm rebuild node-sass to download the binding for your current environment.
I have of course already try :
npm uninstall node-sass && install node-sass
npm rebuild node-sass
trying another Docker library (ex: alpine)...
But nothing... Does someone have any idea ? Thank for your help
docker node-sass
docker node-sass
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 16 hours ago
Jérôme Dupuis
41
41
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Jérôme Dupuis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Jérôme Dupuis is a new contributor. Be nice, and check out our Code of Conduct.
Jérôme Dupuis is a new contributor. Be nice, and check out our Code of Conduct.
Jérôme Dupuis is a new contributor. Be nice, and check out our Code of Conduct.
Jérôme Dupuis is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53222071%2fnode-sass-on-docker-environment-has-changed%23new-answer', 'question_page');
);
Post as a guest
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
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
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