ENOENT, stat '-stylus' at Error (native)
ENOENT, stat '-stylus' at Error (native)
我在使用手写笔时有这个奇怪的错误消息,首先我在 Linux 机器上安装了 github 的 nodejs,然后我npm install -g stylus autoprefixer-stylus
运行了这个命令,我得到了这个错误日志/消息
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/autoprefixer-stylus'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/autoprefixer-stylus']
npm ERR! stack: 'Error: EACCES, unlink ''/usr/local/lib/node_modules/autoprefixer-stylus'''n at Error (native)',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/autoprefixer-stylus' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "stylus" "autoprefixer-stylus"
npm ERR! cwd /home/avinashizhere
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/autoprefixer-stylus
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/autoprefixer-stylus'
npm ERR! stack at Error (native)
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/autoprefixer-stylus'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: EACCES, unlink '/usr/local/lib/node_modules/autoprefixer-stylus']
npm ERR! error rolling back stack: 'Error: EACCES, unlink ''/usr/local/lib/node_modules/autoprefixer-stylus'''n at Error (native)',
npm ERR! error rolling back errno: -13,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/autoprefixer-stylus' }
npm ERR! not ok code 0
可以理解的是,我必须使用sudo
来运行它,我确实添加了sudo
并且得到了这个输出
/usr/local/bin/stylus -> /usr/local/lib/node_modules/stylus/bin/stylus
autoprefixer-stylus@0.4.0 /usr/local/lib/node_modules/autoprefixer-stylus
└── autoprefixer-core@4.0.2 (caniuse-db@1.0.30000037, postcss@3.0.7)
stylus@0.49.3 /usr/local/lib/node_modules/stylus
├── css-parse@1.7.0
├── mkdirp@0.3.5
├── sax@0.5.8
├── debug@2.1.0 (ms@0.6.2)
├── source-map@0.1.41 (amdefine@0.1.0)
└── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)
现在我想我需要包/文件,现在我stylus -u autoperfixer -stylus -w style.styl
运行了这个命令,我得到了这个
/usr/local/lib/node_modules/stylus/bin/stylus:625
if (err) throw err;
^
Error: ENOENT, stat '-stylus'
at Error (native)
我不知道出了什么问题,还是我错过了什么?
您正在运行错误的命令,要在终端上运行手写笔:
sudo npm install -g stylus
然后,如果要安装自动前缀手写笔,请运行:
sudo npm install -g autoprefixer-stylus
现在我想我需要随身携带包/文件,现在我
stylus -u autoperfixer -stylus
-w style.styl 运行了这个命令,我得到了这个
这是autoprefixer-stylus
,而不是autoperfixer -stylus
。
相关文章:
- React Native通过Navigator将用户输入数据传递到选项卡栏IOS中的组件
- 使用Native Sockets在Android中实现WebSockets
- jQuery Error adadvisor.net
- 使用Jest测试React Native应用程序
- 是否存在React Native“;WEB代码安全防护”;
- React Native Listview留有余地
- 如何在React Native中绘制图形
- 在iOS和Android上使用React native时,我还能使用本机第三方lirbraries吗
- Ajax调用ERror Cross Origin REquest:在rails中自动完成大学列表
- 使用createContainer将Meteor数据获取到React Native中时出现问题
- React Native当前是否支持访问用户'的通讯簿
- React Native-What'It’在任何地方都要留下逗号
- 类型error primeFactors.for不是函数
- React Native DeviceEventEmitter键盘WillShow停止工作
- Array.every返回false,而不是类型error
- datatables.net ajax error - http://datatables.net/tn/7
- 与React Native的Chart.js等效
- 如何使用webview在React Native中使用Highcharts
- 如何在React Native的MapView中设置标记
- ENOENT, stat '-stylus' at Error (native)