0

当我从bootstrap-v5文件夹运行命令 npm install --save-dev sass时,出现如下所示的错误

npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../sass/sass.js
npm ERR! dest/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../sass/sass.js' -> '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'
npm ERR!  [Error: EPERM: operation not permitted, symlink '../sass/sass.js' -> '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'] {
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../sass/sass.js',
npm ERR!   dest: '/storage/emulated/0/Android/data/io.spck/files/New_Portfolio_project/bootstrap-v5/node_modules/.bin/sass'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2021-09-29T17_41_24_947Z-debug.log

但是我可以使用命令npm i -g sass 全局安装 sass。我只是第一次尝试这个。而且,由于我已经在全球范围内安装了 sass,有什么方法可以将 sass 导入我的项目?

4

1 回答 1

0

尝试 npm install node-sass 而不是 npm install sass

于 2021-09-30T09:11:15.270 回答