TritonDataCenter / node-smartdc

Legacy Client SDK and CLI for Triton Data Center

Home Page:https://tritondatacenter.com/getting-started

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install error on darwin with pkgsrc nodejs-8

bahamat opened this issue · comments

> node --version
v8.10.0
> sudo npm install -g smartdc
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/opt/pkg/bin/sdc-createinstrumentation -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createinstrumentation
/opt/pkg/bin/sdc-chmod -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-chmod
/opt/pkg/bin/sdc-addmachinetags -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-addmachinetags
/opt/pkg/bin/sdc-deletefirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletefirewallrule
/opt/pkg/bin/sdc-createmachinesnapshot -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createmachinesnapshot
/opt/pkg/bin/sdc-createmachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createmachine
/opt/pkg/bin/sdc-createfirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createfirewallrule
/opt/pkg/bin/sdc-deleteimage -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deleteimage
/opt/pkg/bin/sdc-deletekey -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletekey
/opt/pkg/bin/sdc-deletemachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletemachine
/opt/pkg/bin/sdc-createkey -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createkey
/opt/pkg/bin/sdc-deleteinstrumentation -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deleteinstrumentation
/opt/pkg/bin/sdc-deletemachinemetadata -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletemachinemetadata
/opt/pkg/bin/sdc-deletemachinesnapshot -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletemachinesnapshot
/opt/pkg/bin/sdc-deletemachinetag -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-deletemachinetag
/opt/pkg/bin/sdc-disablemachinefirewall -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-disablemachinefirewall
/opt/pkg/bin/sdc-describeanalytics -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-describeanalytics
/opt/pkg/bin/sdc-disablefirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-disablefirewallrule
/opt/pkg/bin/sdc-enablemachinefirewall -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-enablemachinefirewall
/opt/pkg/bin/sdc-exportimage -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-exportimage
/opt/pkg/bin/sdc-fabric -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-fabric
/opt/pkg/bin/sdc-getaccount -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getaccount
/opt/pkg/bin/sdc-enablefirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-enablefirewallrule
/opt/pkg/bin/sdc-getfirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getfirewallrule
/opt/pkg/bin/sdc-getkey -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getkey
/opt/pkg/bin/sdc-getinstrumentation -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getinstrumentation
/opt/pkg/bin/sdc-getmachinemetadata -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getmachinemetadata
/opt/pkg/bin/sdc-getmachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getmachine
/opt/pkg/bin/sdc-getmachineaudit -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getmachineaudit
/opt/pkg/bin/sdc-getmachinesnapshot -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getmachinesnapshot
/opt/pkg/bin/sdc-getmachinetag -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getmachinetag
/opt/pkg/bin/sdc-info -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-info
/opt/pkg/bin/sdc-createimagefrommachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-createimagefrommachine
/opt/pkg/bin/sdc-getimage -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getimage
/opt/pkg/bin/sdc-getpackage -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getpackage
/opt/pkg/bin/sdc-getnetwork -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-getnetwork
/opt/pkg/bin/sdc-listimages -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listimages
/opt/pkg/bin/sdc-listdatacenters -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listdatacenters
/opt/pkg/bin/sdc-listfirewallrulemachines -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listfirewallrulemachines
/opt/pkg/bin/sdc-listinstrumentations -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listinstrumentations
/opt/pkg/bin/sdc-listmachinefirewallrules -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listmachinefirewallrules
/opt/pkg/bin/sdc-listkeys -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listkeys
/opt/pkg/bin/sdc-listfirewallrules -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listfirewallrules
/opt/pkg/bin/sdc-listmachinemetadata -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listmachinemetadata
/opt/pkg/bin/sdc-listmachines -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listmachines
/opt/pkg/bin/sdc-listmachinetags -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listmachinetags
/opt/pkg/bin/sdc-listnetworks -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listnetworks
/opt/pkg/bin/sdc-policy -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-policy
/opt/pkg/bin/sdc-listpackages -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listpackages
/opt/pkg/bin/sdc-renamemachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-renamemachine
/opt/pkg/bin/sdc-nics -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-nics
/opt/pkg/bin/sdc-rebootmachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-rebootmachine
/opt/pkg/bin/sdc-replacemachinetags -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-replacemachinetags
/opt/pkg/bin/sdc-role -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-role
/opt/pkg/bin/sdc-listmachinesnapshots -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-listmachinesnapshots
/opt/pkg/bin/sdc-resizemachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-resizemachine
/opt/pkg/bin/sdc-stopmachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-stopmachine
/opt/pkg/bin/sdc-startmachine -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-startmachine
/opt/pkg/bin/sdc-updateaccount -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-updateaccount
/opt/pkg/bin/sdc-startmachinefromsnapshot -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-startmachinefromsnapshot
/opt/pkg/bin/sdc-updateimage -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-updateimage
/opt/pkg/bin/sdc-updatefirewallrule -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-updatefirewallrule
/opt/pkg/bin/sdc-user -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-user
/opt/pkg/bin/sdc-updatemachinemetadata -> /opt/pkg/lib/node_modules/smartdc/bin/sdc-updatemachinemetadata

> dtrace-provider@0.6.0 install /opt/pkg/lib/node_modules/smartdc/node_modules/dtrace-provider
> node scripts/install.js

fs.js:766
  return binding.rename(pathModule._makeLong(oldPath),
                 ^

Error: EACCES: permission denied, rename '/opt/pkg/lib/node_modules/smartdc/node_modules/dtrace-provider/compile.py' -> '/opt/pkg/lib/node_modules/smartdc/node_modules/dtrace-provider/binding.gyp'
    at Object.fs.renameSync (fs.js:766:18)
    at Object.<anonymous> (/opt/pkg/lib/node_modules/smartdc/node_modules/dtrace-provider/scripts/install.js:14:4)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.6.0 (node_modules/smartdc/node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: dtrace-provider@0.6.0 install: `node scripts/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ smartdc@8.1.0
updated 1 package in 3.191s

Notably, it's not unusable.

> sdc-listdatacenters 
{
  "us-east-1": "https://us-east-1.api.joyentcloud.com",
  "us-west-1": "https://us-west-1.api.joyentcloud.com",
  "us-sw-1": "https://us-sw-1.api.joyentcloud.com",
  "eu-ams-1": "https://eu-ams-1.api.joyentcloud.com",
  "us-east-2": "https://us-east-2.api.joyentcloud.com",
  "us-east-3": "https://us-east-3.api.joyentcloud.com"
}

Workaround for anybody landing here:

sudo npm install -g --unsafe-perm smartdc

This is nodejs/node-gyp#454 which they have no intention of fixing, so users are left blaming pkgsrc. There's nothing we can do about this. I recommend using yarn.