Vue-cli create project fails with Sass/SCSS (with node-sass) in Node.js 16
See original GitHub issueVersion
4.5.13
Environment info
Mac OS Big Sur 11.2.3
node v16.1.0
npm 7.13.0
@vue/cli 4.5.13
Steps to reproduce
vue create vue4
Vue CLI v4.5.13 ? Please pick a preset: Manually select features ? Check the features needed for your project: Choose Vue version, Babel, TS, Router, CSS Pre-processors, Linter ? Choose a version of Vue.js that you want to start the project with 3.x ? Use class-style component syntax? No ? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes ? Use history mode for router? (Requires proper server setup for index fallback in production) Yes ? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with node-sass) ? Pick a linter / formatter config: Prettier ? Pick additional lint features: Lint on save ? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files ? Save this as a preset for future projects? Yes ? Save preset as: LAst Vue4
What is expected?
Installed project
What is actually happening?
Too many npm errors when installing dependancies.
npm ERR! code 1 npm ERR! path /Users/admin/Documents/WWW/myland.loc/vue4/node_modules/node-sass npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/ast.o npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o
… many lines of errors …
npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: npm ERR! /Users/admin/.npm/_logs/2021-05-14T08_02_09_147Z-debug.log ERROR command failed: npm install --loglevel error --legacy-peer-deps
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
node-sass
is deprecated, please avoid using it if possible (usesass
instead). Vue CLI v5 won’t provide this option on creation anymore.node-sass
has only released a version that supports Node.js 16 days ago. Vue CLI still creates projects with an older version ofnode-sass
, which supports Node.js 14 at most.Agreed, just had the same problems while trying my first tutorial in vue, its confusing to have that option in there if its known to fail!