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










share|improve this question







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.























    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










    share|improve this question







    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.





















      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










      share|improve this question







      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






      share|improve this question







      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.











      share|improve this question







      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.









      share|improve this question




      share|improve this question






      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.



























          active

          oldest

          votes











          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',
          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
          );



          );






          Jérôme Dupuis is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          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



































          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.









           

          draft saved


          draft discarded


















          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.













           


          draft saved


          draft discarded














          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














































































          這個網誌中的熱門文章

          tkz-euclide: tkzDrawCircle[R] not working

          How to combine Bézier curves to a surface?

          1st Magritte Awards