Skip to content

Trouble Running Browser example #113

@ashays

Description

@ashays

Wanted to play around with orbit-db for a project but was having trouble getting the browser example working (though the Node.js example did work). I'm using Mac OS X with Node v6.4.0 and npm version 3.10.8. Would appreciate any assistance or feedback about what the problem may be! Thanks a ton

Here's the output when I try to execute npm run build:examples after npm install did not error:

> orbit-db@0.13.2 build:examples /Users/employee/Documents/gilbert/orbit-db
> webpack --config conf/webpack.example.config.js

Hash: fc0cf69b5c90511c787d
Version: webpack 2.1.0-beta.25
Time: 17644ms
                       Asset    Size  Chunks             Chunk Names
./examples/browser/bundle.js  282 kB       0  [emitted]  main
    + 151 hidden modules

ERROR in ./~/exports-loader?IpfsApi!./~/ipfs-api/dist/index.js
Module build failed: SyntaxError: Deleting local variable in strict mode (26454:4)

  26452 |   deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
  26453 |   if(nodeJS) {
> 26454 |     delete define;
        |     ^
  26455 |     return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
  26456 |   }
  26457 |   define = tmpDefine;

 @ ./examples/browser/index.js 3:14-63

ERROR in ./~/orbit-db-eventstore/src/EventStore.js
Module not found: Error: Can't resolve 'lodash.slice' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/orbit-db-eventstore/src'
 @ ./~/orbit-db-eventstore/src/EventStore.js 37:12-35
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

ERROR in ./~/orbit-db-eventstore/src/EventStore.js
Module not found: Error: Can't resolve 'lodash.findindex' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/orbit-db-eventstore/src'
 @ ./~/orbit-db-eventstore/src/EventStore.js 39:16-43
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

ERROR in ./~/orbit-db-counterstore/src/CounterIndex.js
Module not found: Error: Can't resolve 'crdts/src/G-Counter' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/orbit-db-counterstore/src'
 @ ./~/orbit-db-counterstore/src/CounterIndex.js 13:14-44
 @ ./~/orbit-db-counterstore/src/CounterStore.js
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

ERROR in (webpack)/~/node-libs-browser/~/buffer/index.js
Module not found: Error: Can't resolve 'base64-js' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer'
 @ (webpack)/~/node-libs-browser/~/buffer/index.js 11:13-33
 @ ./~/ipfs-log/src/log.js
 @ ./~/orbit-db-store/src/Store.js
 @ ./~/orbit-db-eventstore/src/EventStore.js
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

ERROR in (webpack)/~/node-libs-browser/~/buffer/index.js
Module not found: Error: Can't resolve 'ieee754' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/webpack/node_modules/node-libs-browser/node_modules/buffer'
 @ (webpack)/~/node-libs-browser/~/buffer/index.js 12:14-32
 @ ./~/ipfs-log/src/log.js
 @ ./~/orbit-db-store/src/Store.js
 @ ./~/orbit-db-eventstore/src/EventStore.js
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

ERROR in (webpack)/~/node-libs-browser/~/timers-browserify/main.js
Module not found: Error: Can't resolve 'process/browser.js' in '/Users/employee/Documents/gilbert/orbit-db/node_modules/webpack/node_modules/node-libs-browser/node_modules/timers-browserify'
 @ (webpack)/~/node-libs-browser/~/timers-browserify/main.js 1:15-44
 @ ./~/bluebird/js/browser/bluebird.js
 @ ./~/ipfs-log/src/log.js
 @ ./~/orbit-db-store/src/Store.js
 @ ./~/orbit-db-eventstore/src/EventStore.js
 @ ./src/OrbitDB.js
 @ ./examples/browser/index.js

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:examples"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! orbit-db@0.13.2 build:examples: `webpack --config conf/webpack.example.config.js`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the orbit-db@0.13.2 build:examples script 'webpack --config conf/webpack.example.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the orbit-db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack --config conf/webpack.example.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs orbit-db
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls orbit-db
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/employee/Documents/gilbert/orbit-db/npm-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions