Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

async generator syntax error when including js-ipfs on Glitch #3308

Closed
autonome opened this issue Sep 30, 2020 · 2 comments
Closed

async generator syntax error when including js-ipfs on Glitch #3308

autonome opened this issue Sep 30, 2020 · 2 comments
Labels
kind/support A question or request for support

Comments

@autonome
Copy link
Contributor

Probably only fixable on their end, whatever node version, etc... but also means people cannot use js-ipfs on Glitch, which is sadface.

  • Version:

latest - in log below.

  • Platform:

Glitch.com on Firefox Nightly

  • Subsystem:

Severity:

TBD

Description:

  • create a new Glitch project
  • include ipfs package
  • require it in the script
  • viola
/rbd/pnpm-volume/b97385a6-18ae-4461-a196-a6585ed92c44/node_modules/.registry.npmjs.org/ipfs-utils/3.0.0/node_modules/ipfs-utils/src/files/glob-source.js:23

module.exports = async function * globSource (paths, options) {
                                ^

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> (/rbd/pnpm-volume/b97385a6-18ae-4461-a196-a6585ed92c44/node_modules/.registry.npmjs.org/ipfs/0.50.2/node_modules/ipfs/src/core/index.js:6:20)

@autonome autonome added the need/triage Needs initial labeling and prioritization label Sep 30, 2020
@achingbrain
Copy link
Member

achingbrain commented Sep 30, 2020

I’ve never used Glitch but that sort of error is because it’s running under an ancient version of node. Apparently you need to specify an engines field in your package.json to get node 12?

https://support.glitch.com/t/upgrading-node-on-glitch/12458

@achingbrain achingbrain added kind/support A question or request for support and removed need/triage Needs initial labeling and prioritization labels Sep 30, 2020
@autonome
Copy link
Contributor Author

Bah, I read all the forum posts about generators and didn't put it together it was possible to swap node versions!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants