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

fresh install of IPFS as dep results in older version of async #907

Closed
pgte opened this issue Jul 10, 2017 · 5 comments
Closed

fresh install of IPFS as dep results in older version of async #907

pgte opened this issue Jul 10, 2017 · 5 comments

Comments

@pgte
Copy link
Contributor

pgte commented Jul 10, 2017

Fresh install of IPFS as a dependency results in an installed version that resolved async to version 1.5.2.

Symptom: when browserifying the app, the following error occurs:

Error: Cannot find module 'async/each' from '/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/libp2p/src'
    at /Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
    at process (/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

When starting IPFS from within the node_modules/ipfs dir:

→ node ./node_modules/ipfs/src/core/index.js
module.js:471
    throw err;
    ^

Error: Cannot find module 'async/setImmediate'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/pedroteixeira/demos/ipfs-pubsub-demo/node_modules/libp2p/src/index.js:6:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
@pgte
Copy link
Contributor Author

pgte commented Jul 10, 2017

Here is what an npm ls async looks like at the app folder:

ipfs-pubsub-demo@0.0.1 /Users/pedroteixeira/demos/ipfs-pubsub-demo
├─┬ http-server@0.10.0
│ └─┬ portfinder@1.0.13
│   └── async@1.5.2 
└─┬ ipfs@0.24.1
  ├── async@2.5.0 
  ├─┬ ipfs-api@14.0.4
  │ ├── async@2.5.0 
  │ └─┬ ipld-dag-pb@0.11.0
  │   └── async@2.5.0 
  ├─┬ ipfs-bitswap@0.13.1
  │ ├── async@2.5.0 
  │ └─┬ multihashing-async@0.4.5
  │   └── async@2.5.0 
  ├─┬ ipfs-repo@0.13.1
  │ ├── async@2.5.0 
  │ ├─┬ datastore-core@0.2.0
  │ │ └── async@2.5.0 
  │ ├─┬ datastore-fs@0.2.0
  │ │ └─┬ interface-datastore@0.1.1
  │ │   └── async@2.5.0 
  │ ├─┬ interface-datastore@0.2.2
  │ │ └── async@2.5.0 
  │ └─┬ lock-me@1.0.2
  │   └── async@2.5.0 
  ├─┬ ipfs-unixfs-engine@0.19.2
  │ └── async@2.5.0 
  ├─┬ ipld-resolver@0.11.1
  │ ├── async@2.5.0 
  │ ├─┬ ipld-dag-cbor@0.11.1
  │ │ └── async@2.5.0 
  │ ├─┬ ipld-eth-block@2.2.2
  │ │ └─┬ ethereumjs-block@1.5.1
  │ │   └── async@2.5.0 
  │ ├─┬ ipld-eth-block-list@1.0.4
  │ │ └── async@2.5.0 
  │ ├─┬ ipld-eth-state-trie@1.0.4
  │ │ ├── async@2.5.0 
  │ │ ├─┬ ipld-eth-account-snapshot@1.0.1
  │ │ │ └── async@2.5.0 
  │ │ └─┬ ipld-eth-trie@2.0.1
  │ │   └── async@2.5.0 
  │ ├─┬ ipld-eth-storage-trie@1.0.1
  │ │ ├─┬ aegir@9.4.0
  │ │ │ ├─┬ karma-sauce-launcher@1.1.0
  │ │ │ │ ├─┬ sauce-connect-launcher@0.17.0
  │ │ │ │ │ └── async@1.4.0 
  │ │ │ │ └─┬ wd@1.3.0
  │ │ │ │   ├─┬ archiver@1.3.0
  │ │ │ │   │ └── async@2.5.0 
  │ │ │ │   └── async@2.0.1 
  │ │ │ ├─┬ karma-webpack@2.0.4
  │ │ │ │ └── async@0.9.2 
  │ │ │ └─┬ webpack@2.6.1
  │ │ │   ├── async@2.5.0 
  │ │ │   └─┬ watchpack@1.3.1
  │ │ │     └── async@2.5.0 
  │ │ └── async@2.5.0 
  │ └─┬ ipld-eth-tx-trie@1.0.1
  │   ├── async@2.5.0 
  │   └─┬ ipld-eth-tx@1.0.1
  │     └── async@2.5.0 
  ├─┬ libp2p-floodsub@0.9.4
  │ ├── async@2.5.0 
  │ └─┬ libp2p-crypto@0.8.8
  │   ├── async@2.5.0 
  │   └─┬ libp2p-crypto-secp256k1@0.1.4
  │     └── async@2.5.0 
  ├─┬ libp2p-ipfs-browser@0.24.1
  │ ├─┬ libp2p-multiplex@0.4.3
  │ │ └── async@2.5.0 
  │ ├─┬ libp2p-railing@0.5.1
  │ │ └── async@2.5.0 
  │ ├─┬ libp2p-secio@0.6.8
  │ │ └── async@2.5.0 
  │ ├─┬ libp2p-swarm@0.29.1
  │ │ ├── async@2.5.0 
  │ │ └─┬ multistream-select@0.13.5
  │ │   └── async@2.5.0 
  │ └─┬ libp2p-webrtc-star@0.10.1
  │   └── async@2.5.0 
  ├─┬ libp2p-ipfs-nodejs@0.25.2
  │ └─┬ libp2p-kad-dht@0.1.0
  │   ├── async@2.5.0 
  │   └─┬ libp2p-record@0.3.1
  │     └── async@2.5.0 
  └─┬ peer-id@0.8.7
    └── async@2.5.0 

@daviddias
Copy link
Member

just quickly published a patch version on libp2p. Could you try to do a fresh npm install on js-ipfs latest master? I'm trying figuring out why that error 'today', since we had fixed all the async/setImmediate a while ago. Did you change your npm version?

@pgte
Copy link
Contributor Author

pgte commented Jul 10, 2017

I've nailed it down to this issue occurring in libp2p v0.9.1: libp2p/js-libp2p#108

@daviddias
Copy link
Member

Not running tests with browserify keeps biting us. Would love to have this as part of aegir -> ipfs/aegir#102

@daviddias
Copy link
Member

Won't be an issue once 0.25 is released (tomorrow) #910 🎉 thanks for catching it!

MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this issue May 22, 2020
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants