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

examples/transfer-files doesn't work #905

Closed
jmc265 opened this issue Jul 10, 2017 · 4 comments · Fixed by #906
Closed

examples/transfer-files doesn't work #905

jmc265 opened this issue Jul 10, 2017 · 4 comments · Fixed by #906
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@jmc265
Copy link

jmc265 commented Jul 10, 2017

The transfer-files example fails in Chrome when you click the Start button with this error:

Uncaught TypeError: createServer is not a function
    at module.exports (ipfs.js:86708)
    at WebSockets.createListener (ipfs.js:86675)
    at ipfs.js:83956
    at ipfs.js:35190
    at eachOfArrayLike (ipfs.js:25480)
    at exports.default (ipfs.js:25424)
    at _parallel (ipfs.js:35189)
    at parallelLimit (ipfs.js:10477)
    at Object.listen (ipfs.js:83976)
    at each (ipfs.js:83605)

There are the steps to reproduce:

git clone https://github.com/ipfs/js-ipfs.git js-ipfs
cd js-ipfs
npm install
npm run build
cd examples/transfer-files/
npm install
npm start
In browser navigate to http://127.0.0.1:12345/
In web app, click 'Start IPFS' button
Observe error in web console
@jmc265
Copy link
Author

jmc265 commented Jul 10, 2017

Replacing
<script src="js/ipfs.js"></script>
with
<script src="https://unpkg.com/ipfs/dist/index.min.js"></script>
in examples/transfer-files/index.html
is a work-around.

@daviddias
Copy link
Member

thanks for the report @jmc265, looking into this! :)

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Jul 10, 2017
@daviddias daviddias self-assigned this Jul 10, 2017
@daviddias
Copy link
Member

found the issue. It should have been .json and not .js at https://github.com/ipfs/js-ipfs/blob/master/package.json#L11. Pushing a fix :)

daviddias added a commit that referenced this issue Jul 10, 2017
@daviddias daviddias mentioned this issue Jul 10, 2017
3 tasks
@daviddias
Copy link
Member

fix here #906

daviddias added a commit that referenced this issue Jul 10, 2017
dryajov pushed a commit that referenced this issue Sep 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants