OS X - npm install changes?



  • So, since it seems as though my 2 minute recording files are due to permissions problems, I looked back at my installation progress when I installed the Pro repository end of December, and managed to change permissions on my /user/.config/ folder in OS X (hidden folder, got the permission error during installation here).

    So I renamed my Shinobi folder to Shinobi.old and started again with

    git clone https://github.com/ShinobiCCTV/Shinobi Shinobi
    

    which gave me this status

    Cloning into 'Shinobi'...
    remote: Counting objects: 1442, done.
    remote: Compressing objects: 100% (31/31), done.
    remote: Total 1442 (delta 14), reused 32 (delta 12), pack-reused 1398
    Receiving objects: 100% (1442/1442), 4.17 MiB | 2.90 MiB/s, done.
    Resolving deltas: 100% (835/835), done.
    

    I did not get the

    warning: unable to access '/Users/osxusernamehere/.config/git/attributes': Permission denied
    

    error like last time I install, so hopefully that's a good sign.

    So then I went with the npm install command, and got this error, which I did not see in December.

    Computer:~ usernamehere$ cd Shinobi
    Computer:Shinobi usernamehere$ npm install
    npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
    
    > [email protected] install /Users/usernamehere/Shinobi/node_modules/dtrace-provider
    > node-gyp rebuild || node suppress-error.js
    
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
      ACTION binding_gyp_ndtp_target_build_ndtp .
      TOUCH Release/obj.target/ndtp.stamp
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN [email protected] license should be a valid SPDX license expression
    

    So, what's changed for Brew/OS X since end of December to install Shinobi?



  • So I started over again with moving the old Shinobi folder and installing the dev branch, got the same error but npm prompted me to update...

    Cloning into 'Shinobi'...
    remote: Counting objects: 1442, done.
    remote: Compressing objects: 100% (31/31), done.
    remote: Total 1442 (delta 14), reused 32 (delta 12), pack-reused 1398
    Receiving objects: 100% (1442/1442), 4.17 MiB | 2.95 MiB/s, done.
    Resolving deltas: 100% (835/835), done.
    Computer:~ usernamehere$ cd Shinobi
    Computer:Shinobi usernamehere$ npm install
    npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
    
    > [email protected] install /Users/usernamehere/Shinobi/node_modules/dtrace-provider
    > node-gyp rebuild || node suppress-error.js
    
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
    xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
    
      ACTION binding_gyp_ndtp_target_build_ndtp .
      TOUCH Release/obj.target/ndtp.stamp
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN [email protected] license should be a valid SPDX license expression
    
    added 221 packages in 10.424s
    
    
       ╭─────────────────────────────────────╮
       │                                     │
       │   Update available 5.5.1 → 5.6.0    │
       │     Run npm i -g npm to update      │
       │                                     │
       ╰─────────────────────────────────────╯
    
    Computer:Shinobi usernamehere$ 
    

    Could needing to update npm be the solution? I figured why not try, so I ran npm i -g npm to update and got this:

    Computer:Shinobi usernamehere$ npm i -g npm
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/yallist
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/boxen/node_modules/string-width/node_modules/strip-ansi
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/boxen/node_modules/term-size/node_modules/execa/node_modules/cross-spawn-async
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/boxen/node_modules/term-size/node_modules/execa/node_modules/object-assign
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/boxen/node_modules/term-size/node_modules/execa/node_modules/path-key
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/has-ansi
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/strip-ansi
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/has-ansi/node_modules
    npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm/node_modules/update-notifier/node_modules/chalk/node_modules/strip-ansi/node_modules
    npm ERR! path /usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap
    npm ERR! code EACCES
    npm ERR! errno -13
    npm ERR! syscall access
    npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap'
    npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap'
    npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap\'',
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'access',
    npm ERR!   path: '/usr/local/lib/node_modules/npm/node_modules/cacache/node_modules/lru-cache/node_modules/pseudomap' }
    npm ERR! 
    npm ERR! Please try running this command again as root/Administrator.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/usernamehere/.npm/_logs/2018-01-23T17_56_40_170Z-debug.log
    
    Computer:Shinobi usernamehere$ 
    

    So there are some permissions problems here in order to update, and I probably could have run the command with sudo but I'm not sure, so I'll just sit tight as it looks like I've got unsupported packages for crypto and xcode errors anyways, and the npm installation process has changed since I installed Shinobi on several computers in December.



  • So I went ahead and tried to just get it up and going, and copied the settings with the cp command, conf.json and super.json, and started camera.js and cron.js, and then I had two instances of camera.js and cron.js in the pm2 Terminal status window.

    Computer:Shinobi usernamehere$ cp ../Shinobi.old/conf.json conf.json
    Computer:Shinobi usernamehere$ cp ../Shinobi.old/super.json super.json
    Computer:Shinobi usernamehere$ pm2 start cron.js
    [PM2] Starting /Users/usernamehere/Shinobi/cron.js in fork_mode (1 instance)
    [PM2] Done.
    ┌────────┬──────┬─────────┬────┬─────┬───────────┐
    │ Name   │ mode │ status  │ ↺  │ cpu │ memory    │
    ├────────┼──────┼─────────┼────┼─────┼───────────┤
    │ camera │ fork │ stopped │ 30 │ 0%  │ 0 B       │
    │ cron   │ fork │ stopped │ 30 │ 0%  │ 0 B       │
    │ cron   │ fork │ online  │ 0  │ 0%  │ 18.5 MB   │
    └────────┴──────┴─────────┴────┴─────┴───────────┘
     Use `pm2 show <id|name>` to get more details about an app
    Computer:Shinobi usernamehere$ pm2 start camera.js
    [PM2] Starting /Users/usernamehere/Shinobi/camera.js in fork_mode (1 instance)
    [PM2] Done.
    ┌────────┬──────┬─────────┬────┬─────┬───────────┐
    │ Name   │ mode │ status  │ ↺  │ cpu │ memory    │
    ├────────┼──────┼─────────┼────┼─────┼───────────┤
    │ camera │ fork │ stopped │ 30 │ 0%  │ 0 B       │
    │ camera │ fork │ online  │ 0  │ 0%  │ 13.1 MB   │
    │ cron   │ fork │ stopped │ 30 │ 0%  │ 0 B       │
    │ cron   │ fork │ online  │ 0  │ 0%  │ 89.9 MB   │
    └────────┴──────┴─────────┴────┴─────┴───────────┘
     Use `pm2 show <id|name>` to get more details about an app
    Computer:Shinobi usernamehere$ 
    

    Not sure why, so I restarted, cd into Shinobi, and only one instance of each was running after pm2 start cron.js and pm2 start camera.js were going, then ran pm2 startup and pm2 save to get it to run on reboot.

    So, are there any problems due to me running Shinobi with those npm errors during install?


  • administrators

    strange. I will have to rewrite the installer. I think this is the first time I have actually asked that users try it. 😅 Already in flames 😛


 

Looks like your connection to Shinobi Forum was lost, please wait while we try to reconnect.