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

Example: Exchange files in browser is broken - no ipfs module #1424

Closed
0x-r4bbit opened this issue Jul 5, 2018 · 3 comments
Closed

Example: Exchange files in browser is broken - no ipfs module #1424

0x-r4bbit opened this issue Jul 5, 2018 · 3 comments
Assignees
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now

Comments

@0x-r4bbit
Copy link
Contributor

Type: Bug

Severity: Medium

Description:

Following the installation and run instructions of that tutorial results in the following error

❯ npm run bundle

> exchange-files-browser@0.0.0 bundle /Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser
> browserify public/app.js > public/bundle.js

Error: Cannot find module 'ipfs' from '/Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/public'
    at /Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
    at process (/Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /Users/pascalprecht/projects/ipfs/js-ipfs/examples/exchange-files-in-browser/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:158:21)

Looking at the installed node_modules, the ipfs package is indeed missing.

Steps to reproduce the error:

$ npm install
$ npm run bundle
@fsdiogo
Copy link
Contributor

fsdiogo commented Jul 5, 2018

That's weird, but it's happening to me too.

I tried changing the package.json dependency to "ipfs": "0.29.3", deleted and reinstalled the node_modules and then everything worked as expected 🤔

I'll take a look at it. Thanks for reporting it!

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/novice Someone with a little familiarity can pick up status/ready Ready to be worked P3 Low: Not priority right now labels Jul 5, 2018
@0x-r4bbit
Copy link
Contributor Author

@fsdiogo thanks for confirming!

I guess to get this quickly out of our way, we should PR the dependency version. Did find anything else?

@ghost ghost added status/in-progress In progress and removed status/ready Ready to be worked labels Jul 11, 2018
@fsdiogo
Copy link
Contributor

fsdiogo commented Jul 11, 2018

It seems to work by upgrading to 0.30.0, so I've made a PR changing that! Thanks 👍

@ghost ghost removed the status/in-progress In progress label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

3 participants