Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack, vue-cli and sass: failed to map segment from shared object: Operation not permitted #526

Closed
TisteDup opened this issue Jul 13, 2017 · 1 comment

Comments

@TisteDup
Copy link

My environment:

  • Centos7 via VirtualBox (installed on Windows7) with a mounted folder
  • Node version: 6.10.3
  • Npm version : 3.10.10
  • I'm behind a corporate proxy

What I did:

I installed vue-cli:

sudo npm install -g vue-cli --no-bin-links

I created a new vue-cli project with the "use sass" option:

vue init webpack-simple my_project_name

I installed dependencies:

cd my_project_name
sudo npm install --no-bin-links

In "package.json" file, I replaced:

"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot"

With:

"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --port 8080 --host 0.0.0.0"

In "node_modules/webpack-dev-server/lib/Server.js" file, I added:

options.watchOptions = {
    aggregateTimeout: 300,
    poll: true
};

I uninstalled sass, then I installed sass again:

npm uninstall node-sass --save-dev
sudo npm install node-sass --save-dev --no-bin-links

Now, I try to start the server:

npm run dev

And I get the following error:

ERROR in ./~/css-loader!./~/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-9ff273a2","scoped":false,"hasInlineConfig":false}!./~/sass-loader/lib/loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue
Module build failed: Error: /var/www/html/my_project_name/node_modules/node-sass/vendor/linux-x64-48/binding.node: failed to map segment from shared object: Operation not permitted
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at module.exports (/var/www/html/my_project_name/node_modules/node-sass/lib/binding.js:19:10)
    at Object.<anonymous> (/var/www/html/my_project_name/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
 @ ./~/vue-style-loader!./~/css-loader!./~/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-9ff273a2","scoped":false,"hasInlineConfig":false}!./~/sass-loader/lib/loader.js!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-317 13:3-17:5 14:22-325
 @ ./src/App.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://0.0.0.0:8080 webpack/hot/dev-server ./src/main.js

For information, everything works fine if I don't activate the "sass" option when I create the project with "vue init".

Does anyone know how to fix it please?

@posva
Copy link
Member

posva commented Jul 13, 2017

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.


Maybe npm rebuild node-sass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants