Closed gauka12345 closed 6 years ago
pi@raspberrypi:~ $ npm install -g miio npm WARN checkPermissions Missing write access to /usr/lib/node_modules /usr/lib └─┬ miio@0.14.0 ├── appdirectory@0.1.0 ├─┬ chalk@1.1.3 │ ├── ansi-styles@2.2.1 │ ├── escape-string-regexp@1.0.5 │ ├─┬ has-ansi@2.0.0 │ │ └── ansi-regex@2.1.1 │ ├── strip-ansi@3.0.1 │ └── supports-color@2.0.0 ├─┬ debug@2.6.9 │ └── ms@2.0.0 ├── minimist@1.2.0 └─┬ mkdirp@0.5.1 └── minimist@0.0.8
npm ERR! Linux 4.9.59-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "miio" npm ERR! node v6.12.2 npm ERR! npm v3.10.10 npm ERR! path /usr/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/lib/node_modules' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! /home/pi/npm-debug.log pi@raspberrypi:~ $
try "sudo npm install -g miio"
i@raspberrypi:~ $ sudo npm install -g miio /usr/bin/miio -> /usr/lib/node_modules/miio/cli/index.js /usr/lib └─┬ miio@0.14.0 ├── appdirectory@0.1.0 ├─┬ chalk@1.1.3 │ ├── ansi-styles@2.2.1 │ ├── escape-string-regexp@1.0.5 │ ├─┬ has-ansi@2.0.0 │ │ └── ansi-regex@2.1.1 │ ├── strip-ansi@3.0.1 │ └── supports-color@2.0.0 ├─┬ debug@2.6.9 │ └── ms@2.0.0 ├── minimist@1.2.0 └─┬ mkdirp@0.5.1 └── minimist@0.0.8
perfect x
thank you
pi@raspberrypi:~ $ npm install --save miio npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json' /home/pi └── miio@0.14.0
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json' npm WARN pi No description npm WARN pi No repository field. npm WARN pi No README data npm WARN pi No license field. pi@raspberrypi:~ $ ^C pi@raspberrypi:~ $