Node Sass couldn't find a binding for your current environment

前端 未结 30 2641
说谎
说谎 2020-11-29 14:23

I am having issues building an app because node-sass keeps failing with the error.

ERROR in Missing binding /Users/warren/Sites/random-docs/my-cms/nod

30条回答
  •  旧巷少年郎
    2020-11-29 14:55

    * Docker related answer here *

    Answer for if you are seeing this problem, or something similar, and are using Docker.

    Cause: When copying over the current file structure to inside the Docker container, you may be copying over node modules from one OS system to another (e.g. a Mac to Linux container).

    Solution:

    Add a .dockerignore, and inside add:

    node_modules

    This will cause an npm install to install the bindings for the docker environment, rather than your local machine environment.

提交回复
热议问题