ipfs-shipyard / ipfs-deploy

Zero-Config CLI to Deploy Static Websites to IPFS
Other
1.16k stars 123 forks source link

NPX: Unexpected token * #24

Closed Exospheric closed 3 years ago

Exospheric commented 5 years ago

NPM has a dependency on XCODE, which is too huge for the casual user or someone with precious SSD space. So the NPX call is probably important to most people.

On MacOs, pretty much everything I try to do begets:

Unexpected token * Some details of the experience: https://js.ipfs.io/ipns/QmZJBQBXX98AuTcoR1HBGdbe5Gph74ZBWSgNemBcqPNv1W/Zero-Config-CLI-to-Deploy-Static-Websites-to-IPFS.html

lanzafame commented 5 years ago

I got the same error when installing via npm:

/home/lanzafame/.config/npm-global/lib/node_modules/@agentofuser/ipfs-deploy/node_modules/pull-stream-to-async-iterator/index.js:4
  return (async function * () {
                         ^

SyntaxError: Unexpected token *
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/lanzafame/.config/npm-global/lib/node_modules/@agentofuser/ipfs-deploy/node_modules/async-iterator-to-pull-stream/index.js:2:20)
agentofuser commented 5 years ago

That's odd. Could you all post the node and npm versions you're using please? Also, @lanzafame, do you have a C++ compiler installed? It seems like there is a transitive native dependency (secp256k1). Not sure if there is a way to check the availability of build tools when trying to install so it prints a more informative message.

hacdias commented 3 years ago

I'm closing this as it's a very old issue. Most likely you're using an outdated version of Node/NPM. Please upgrade! let me know if you run into issues