node-sass / vendor / linux-x64-57 / binding.node:无法从共享对象映射段:不允许操作

时间:2018-08-09 15:15:24

标签: node.js docker npm docker-compose node-sass

我创建docker-compose.yml配置和dockerfile进行前端开发。

Dockerfile

FROM node:8

RUN usermod -u 1000 node
RUN groupmod -g 1000 node

WORKDIR /var/www

USER node

当我放满所有容器时,前端服务出现错误,例如:
我尝试使用任何这种方式,但不起作用
 -尝试更改TMPDIR
 -尝试更改节点版本  -npm rebuild node-sass

[0] ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./application/modules/bonuses/styles.scss 1.27 kB {0} [built] [failed] [1 error]

    ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./application/modules/bonuses/styles.scss
    Module build failed: Error: /var/www/node_modules/node-sass/vendor/linux-x64-57/binding.node: failed to map segment from shared object: Operation not permitted
        at Object.Module._extensions..node (module.js:681:18)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at module.exports (/var/www/node_modules/node-sass/lib/binding.js:19:10)
        at Object.<anonymous> (/var/www/node_modules/node-sass/lib/index.js:14:35)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (/var/www/node_modules/sass-loader/lib/loader.js:3:14)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)

0 个答案:

没有答案