Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
add instructions to use lbclient, refer: #3
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Sep 8, 2016
1 parent 2029cc6 commit 662ac70
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,12 @@ The instructions assume the name of the new model is 'MyModel'.
}
```

6. Create the Polymer Element representing the client Model
TODO: Doc: Create the Polymer Element representing the client Model
6. Use lbclient anywhere:

```js
var lb = require('lbclient');
lb.models.MyModel.method();
```

## Service Worker

Expand Down

10 comments on commit 662ac70

@nigeltiany
Copy link

@nigeltiany nigeltiany commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Build lbclient browser bundle
gulp.task('lbclient', function (done) {
    var b = browserify({
        basedir: path.resolve(rootPath, 'client/loopback')
    });
    b.require(path.resolve(rootPath, 'client/loopback/index.js'), {
        expose: 'envoy-client'
    });
Polymer({
          is: 'home-page',
          ready: function () {
            /**
             * Browserify errors prevent calling the api directly
             */
            var app = require('envoy-client');
            var User = app.models.account;
            console.log(User);
bundle.js:19829 TypeError: fs.readFileSync is not a function(…)config @ bundle.js:19829(anonymous function) @ bundle.js:135685require.480._process  ....
bundle.js:97360 Uncaught TypeError: fs.readdirSync is not a function

@klarkc mmmh...

@klarkc
Copy link
Owner Author

@klarkc klarkc commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigeltiany look for the code in that line, maybe this information can help us. In my bundle.js there is not a readFileSync call in the line 19829

@nigeltiany
Copy link

@nigeltiany nigeltiany commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a really dynamic file that's project dependent. here is mine
fserror
fsaddrerror

@klarkc

@klarkc
Copy link
Owner Author

@klarkc klarkc commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigeltiany My installation does not have the module pkginfo, it's installed in your node_modules? Who depends on it? Show your dependency tree: $ npm list pkginfo

@nigeltiany
Copy link

@nigeltiany nigeltiany commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| | `-- isobject@2.1.0
| |   `-- isarray@1.0.0
| +-- readable-stream@2.1.5
| | `-- isarray@1.0.0
| +-- try-json-parse@0.1.1
| `-- vinyl@1.2.0
|   +-- clone@1.0.2
|   `-- clone-stats@0.0.1
+-- gulp-changed@1.3.2
| `-- through2@2.0.1
|   `-- readable-stream@2.0.6
|     `-- isarray@1.0.0
+-- gulp-gh-pages@0.5.4
| +-- gift@0.6.1
| | `-- underscore@1.7.0
| +-- readable-stream@2.1.5
| | `-- isarray@1.0.0
| +-- vinyl-fs@2.4.3
| | +-- duplexify@3.4.5
| | | +-- end-of-stream@1.0.0
| | | +-- readable-stream@2.1.5
| | | | `-- isarray@1.0.0
| | | `-- stream-shift@1.0.0
| | +-- glob-stream@5.3.4
| | | +-- glob@5.0.15
| | | +-- ordered-read-streams@0.3.0
| | | | `-- is-stream@1.1.0
| | | +-- through2@0.6.5
| | | | `-- readable-stream@1.0.34
| | | |   `-- isarray@0.0.1
| | | +-- to-absolute-glob@0.1.1
| | | | `-- extend-shallow@2.0.1
| | | `-- unique-stream@2.2.1
| | +-- gulp-sourcemaps@1.6.0
| | | +-- convert-source-map@1.3.0
| | | +-- through2@2.0.1
| | | | `-- readable-stream@2.0.6
| | | |   `-- isarray@1.0.0
| | | `-- vinyl@1.2.0
| | +-- is-valid-glob@0.3.0
| | +-- lazystream@1.0.0
| | | `-- readable-stream@2.1.5
| | |   `-- isarray@1.0.0
| | +-- lodash.isequal@4.4.0
| | +-- strip-bom@2.0.0
| | +-- strip-bom-stream@1.0.0
| | +-- through2@2.0.1
| | | `-- readable-stream@2.0.6
| | +-- through2-filter@2.0.0
| | | `-- through2@2.0.1
| | |   `-- readable-stream@2.0.6
| | |     `-- isarray@1.0.0
| | +-- vali-date@1.0.0
| | `-- vinyl@1.2.0
| `-- wrap-promise@1.0.1
|   `-- es6-promise@2.3.0
+-- gulp-html-extract@0.2.0
| +-- cheerio@0.19.0
| | +-- css-select@1.0.0
| | | +-- boolbase@1.0.0
| | | +-- css-what@1.0.0
| | | +-- domutils@1.4.3
| | | `-- nth-check@1.0.1
| | +-- dom-serializer@0.1.0
| | | `-- domelementtype@1.1.3
| | +-- entities@1.1.1
| | +-- htmlparser2@3.8.3
| | | +-- domelementtype@1.3.0
| | | +-- domhandler@2.3.0
| | | +-- domutils@1.5.1
| | | +-- entities@1.0.0
| | | `-- readable-stream@1.1.14
| | `-- lodash@3.10.1
| +-- gulp-util@2.2.14
| | +-- chalk@0.4.0
| | | +-- ansi-styles@1.0.0
| | | +-- has-color@0.1.7
| | | `-- strip-ansi@0.1.1
| | +-- lodash._reinterpolate@2.4.1
| | +-- lodash.template@2.4.1
| | | +-- lodash._escapestringchar@2.4.1
| | | +-- lodash.defaults@2.4.1
| | | | +-- lodash._objecttypes@2.4.1
| | | | `-- lodash.keys@2.4.1
| | | +-- lodash.escape@2.4.1
| | | | +-- lodash._escapehtmlchar@2.4.1
| | | | | `-- lodash._htmlescapes@2.4.1
| | | | `-- lodash._reunescapedhtml@2.4.1
| | | |   `-- lodash.keys@2.4.1
| | | +-- lodash.keys@2.4.1
| | | | +-- lodash._isnative@2.4.1
| | | | +-- lodash._shimkeys@2.4.1
| | | | `-- lodash.isobject@2.4.1
| | | +-- lodash.templatesettings@2.4.1
| | | `-- lodash.values@2.4.1
| | |   `-- lodash.keys@2.4.1
| | +-- minimist@0.0.8
| | +-- multipipe@0.0.2
| | | `-- duplexer2@0.0.1
| | `-- vinyl@0.2.3
| `-- through2@0.4.1
|   +-- readable-stream@1.0.34
|   `-- xtend@2.1.2
|     `-- object-keys@0.4.0
+-- gulp-if@2.0.1
| +-- gulp-match@1.0.2
| +-- ternary-stream@2.0.0
| | +-- fork-stream@0.0.4
| | `-- through2@2.0.1
| |   `-- readable-stream@2.0.6
| |     `-- isarray@1.0.0
| `-- through2@2.0.1
|   `-- readable-stream@2.0.6
|     `-- isarray@1.0.0
+-- gulp-imagemin@3.0.3
| +-- imagemin@5.2.2
| | +-- file-type@3.8.0
| | `-- promise.pipe@3.0.0
| +-- imagemin-gifsicle@5.1.0
| | +-- exec-buffer@3.0.0
| | | +-- execa@0.3.0
| | | | +-- cross-spawn-async@2.2.4
| | | | | `-- lru-cache@4.0.1
| | | | +-- npm-run-path@1.0.0
| | | | +-- path-key@1.0.0
| | | | `-- strip-eof@1.0.0
| | | `-- tempfile@1.1.1
| | +-- gifsicle@3.0.4
| | | +-- bin-build@2.2.0
| | | | +-- archive-type@3.2.0
| | | | +-- decompress@3.0.0
| | | | | +-- buffer-to-vinyl@1.1.0
| | | | | | +-- readable-stream@2.1.5
| | | | | | | `-- isarray@1.0.0
| | | | | | `-- vinyl@1.2.0
| | | | | +-- decompress-tar@3.1.0
| | | | | | +-- is-tar@1.0.0
| | | | | | +-- object-assign@2.1.1
| | | | | | +-- strip-dirs@1.1.1
| | | | | | | +-- is-absolute@0.1.7
| | | | | | | | `-- is-relative@0.1.3
| | | | | | | +-- is-natural-number@2.1.1
| | | | | | | +-- minimist@1.2.0
| | | | | | | `-- sum-up@1.0.3
| | | | | | +-- tar-stream@1.5.2
| | | | | | | +-- bl@1.1.2
| | | | | | | | `-- readable-stream@2.0.6
| | | | | | | +-- end-of-stream@1.1.0
| | | | | | | `-- readable-stream@2.1.5
| | | | | | |   `-- isarray@1.0.0
| | | | | | +-- through2@0.6.5
| | | | | | `-- vinyl@0.4.6
| | | | | |   `-- clone@0.2.0
| | | | | +-- decompress-tarbz2@3.1.0
| | | | | | +-- is-bzip2@1.0.0
| | | | | | +-- object-assign@2.1.1
| | | | | | +-- seek-bzip@1.0.5
| | | | | | | `-- commander@2.8.1
| | | | | | +-- through2@0.6.5
| | | | | | `-- vinyl@0.4.6
| | | | | |   `-- clone@0.2.0
| | | | | +-- decompress-targz@3.1.0
| | | | | | +-- is-gzip@1.0.0
| | | | | | +-- object-assign@2.1.1
| | | | | | +-- through2@0.6.5
| | | | | | `-- vinyl@0.4.6
| | | | | |   `-- clone@0.2.0
| | | | | +-- decompress-unzip@3.4.0
| | | | | | +-- is-zip@1.0.0
| | | | | | +-- stat-mode@0.2.2
| | | | | | `-- vinyl@1.2.0
| | | | | +-- vinyl-assign@1.2.1
| | | | | | `-- readable-stream@2.1.5
| | | | | |   `-- isarray@1.0.0
| | | | | `-- vinyl-fs@2.4.3
| | | | |   +-- glob-stream@5.3.5
| | | | |   | +-- glob@5.0.15
| | | | |   | +-- glob-parent@3.0.0
| | | | |   | | `-- is-glob@3.0.0
| | | | |   | |   `-- is-extglob@2.0.0
| | | | |   | +-- ordered-read-streams@0.3.0
| | | | |   | +-- through2@0.6.5
| | | | |   | | `-- readable-stream@1.0.34
| | | | |   | |   `-- isarray@0.0.1
| | | | |   | `-- unique-stream@2.2.1
| | | | |   +-- readable-stream@2.1.5
| | | | |   | `-- isarray@1.0.0
| | | | |   `-- vinyl@1.2.0
| | | | +-- download@4.4.3
| | | | | +-- caw@1.2.0
| | | | | | +-- get-proxy@1.1.0
| | | | | | `-- object-assign@3.0.0
| | | | | +-- filenamify@1.2.1
| | | | | | +-- filename-reserved-regex@1.0.0
| | | | | | +-- strip-outer@1.0.0
| | | | | | `-- trim-repeated@1.0.0
| | | | | +-- gulp-decompress@1.2.0
| | | | | | `-- readable-stream@2.1.5
| | | | | |   `-- isarray@1.0.0
| | | | | +-- is-url@1.2.2
| | | | | +-- read-all-stream@3.1.0
| | | | | | `-- readable-stream@2.1.5
| | | | | |   `-- isarray@1.0.0
| | | | | +-- readable-stream@2.1.5
| | | | | | `-- isarray@1.0.0
| | | | | +-- vinyl@1.2.0
| | | | | +-- vinyl-fs@2.4.3
| | | | | | `-- glob-stream@5.3.5
| | | | | |   +-- glob@5.0.15
| | | | | |   +-- glob-parent@3.0.0
| | | | | |   | `-- is-glob@3.0.0
| | | | | |   |   `-- is-extglob@2.0.0
| | | | | |   +-- ordered-read-streams@0.3.0
| | | | | |   +-- through2@0.6.5
| | | | | |   | `-- readable-stream@1.0.34
| | | | | |   |   `-- isarray@0.0.1
| | | | | |   `-- unique-stream@2.2.1
| | | | | `-- ware@1.3.0
| | | | |   `-- wrap-fn@0.1.5
| | | | |     `-- co@3.1.0
| | | | +-- exec-series@1.0.3
| | | | | `-- async-each-series@1.1.0
| | | | `-- url-regex@3.2.0
| | | |   `-- ip-regex@1.0.3
| | | +-- bin-wrapper@3.0.2
| | | | +-- bin-check@2.0.0
| | | | | `-- executable@1.1.0
| | | | +-- bin-version-check@2.1.0
| | | | | +-- bin-version@1.0.4
| | | | | | `-- find-versions@1.2.1
| | | | | |   `-- semver-regex@1.0.0
| | | | | +-- minimist@1.2.0
| | | | | `-- semver-truncate@1.1.2
| | | | |   `-- semver@5.3.0
| | | | +-- each-async@1.1.1
| | | | | `-- onetime@1.1.0
| | | | +-- lazy-req@1.1.0
| | | | `-- os-filter-obj@1.0.3
| | | `-- logalot@2.1.0
| | |   `-- squeak@1.3.0
| | |     +-- console-stream@0.1.1
| | |     `-- lpad-align@1.1.0
| | |       +-- longest@1.0.1
| | |       `-- lpad@2.0.1
| | `-- is-gif@1.0.0
| +-- imagemin-jpegtran@5.0.2
| | +-- is-jpg@1.0.0
| | `-- jpegtran-bin@3.1.0
| +-- imagemin-optipng@5.2.0
| | +-- is-png@1.0.0
| | `-- optipng-bin@3.1.2
| +-- imagemin-svgo@5.2.0
| | +-- is-svg@2.0.1
| | | `-- html-comment-regex@1.1.1
| | `-- svgo@0.7.0
| |   +-- coa@1.0.1
| |   +-- colors@1.1.2
| |   +-- csso@2.2.1
| |   | +-- clap@1.1.1
| |   | `-- source-map@0.5.6
| |   +-- sax@1.2.1
| |   `-- whet.extend@0.9.9
| +-- plur@2.1.2
| | `-- irregular-plurals@1.2.0
| +-- pretty-bytes@2.0.1
| | +-- get-stdin@4.0.1
| | +-- meow@3.7.0
| | | +-- camelcase-keys@2.1.0
| | | | `-- camelcase@2.1.1
| | | +-- loud-rejection@1.6.0
| | | | +-- currently-unhandled@0.4.1
| | | | | `-- array-find-index@1.0.1
| | | | `-- signal-exit@3.0.0
| | | +-- map-obj@1.0.1
| | | +-- minimist@1.2.0
| | | +-- normalize-package-data@2.3.5
| | | | +-- hosted-git-info@2.1.5
| | | | +-- is-builtin-module@1.0.0
| | | | | `-- builtin-modules@1.1.1
| | | | `-- validate-npm-package-license@3.0.1
| | | |   +-- spdx-correct@1.0.2
| | | |   | `-- spdx-license-ids@1.2.2
| | | |   `-- spdx-expression-parse@1.0.3
| | | +-- redent@1.0.0
| | | | +-- indent-string@2.1.0
| | | | `-- strip-indent@1.0.1
| | | `-- trim-newlines@1.0.0
| | `-- number-is-nan@1.0.0
| `-- through2-concurrent@1.1.1
+-- gulp-load-plugins@1.2.4
| +-- array-unique@0.2.1
| +-- fancy-log@1.2.0
| | `-- time-stamp@1.0.1
| +-- findup-sync@0.4.2
| | +-- detect-file@0.1.0
| | | `-- fs-exists-sync@0.1.0
| | `-- resolve-dir@0.1.1
| |   `-- global-modules@0.2.3
| |     +-- global-prefix@0.1.4
| |     | `-- ini@1.3.4
| |     `-- is-windows@0.2.0
| +-- gulplog@1.0.0
| | `-- glogg@1.0.0
| +-- has-gulplog@0.1.0
| | `-- sparkles@1.0.0
| `-- resolve@1.1.7
+-- gulp-minify-css@1.2.4
| +-- clean-css@3.4.19
| | +-- commander@2.8.1
| | | `-- graceful-readlink@1.0.1
| | `-- source-map@0.4.4
| |   `-- amdefine@1.0.0
| +-- readable-stream@2.1.5
| | `-- isarray@1.0.0
| `-- vinyl-bufferstream@1.0.1
|   `-- bufferstreams@1.0.1
+-- gulp-minify-html@1.0.6
| +-- minimize@1.8.1
| | +-- argh@0.1.4
| | +-- async@1.5.2
| | +-- cli-color@1.1.0
| | | +-- d@0.1.1
| | | +-- es5-ext@0.10.12
| | | +-- es6-iterator@2.0.0
| | | +-- memoizee@0.3.10
| | | | +-- es6-weak-map@0.1.4
| | | | | +-- es6-iterator@0.1.3
| | | | | `-- es6-symbol@2.0.1
| | | | +-- lru-queue@0.1.0
| | | | `-- next-tick@0.2.2
| | | `-- timers-ext@0.1.0
| | +-- diagnostics@1.0.1
| | | +-- colorspace@1.0.1
| | | | +-- color@0.8.0
| | | | | +-- color-convert@0.5.3
| | | | | `-- color-string@0.3.0
| | | | |   `-- color-name@1.1.1
| | | | `-- text-hex@0.0.0
| | | +-- enabled@1.0.2
| | | | `-- env-variable@0.0.3
| | | `-- kuler@0.0.0
| | |   `-- colornames@0.0.2
| | +-- emits@3.0.0
| | `-- htmlparser2@3.9.1
| |   `-- readable-stream@2.1.5
| |     `-- isarray@1.0.0
| `-- through2@0.6.5
+-- gulp-rename@1.2.2
+-- gulp-replace@0.5.4
| +-- istextorbinary@1.0.2
| | +-- binaryextensions@1.0.1
| | `-- textextensions@1.0.2
| +-- readable-stream@2.1.5
| | `-- isarray@1.0.0
| `-- replacestream@4.0.2
|   `-- readable-stream@2.1.5
|     `-- isarray@1.0.0
+-- gulp-size@2.1.0
| +-- gzip-size@3.0.0
| | `-- duplexer@0.1.1
| +-- pretty-bytes@3.0.1
| +-- stream-counter@1.0.0
| `-- through2@2.0.1
|   `-- readable-stream@2.0.6
|     `-- isarray@1.0.0
+-- gulp-uglify@2.0.0
| +-- make-error-cause@1.2.1
| | `-- make-error@1.2.1
| +-- uglify-js@2.7.0
| | +-- async@0.2.10
| | +-- source-map@0.5.6
| | +-- uglify-to-browserify@1.0.2
| | `-- yargs@3.10.0
| |   +-- cliui@2.1.0
| |   | +-- center-align@0.1.3
| |   | | +-- align-text@0.1.4
| |   | | `-- lazy-cache@1.0.4
| |   | +-- right-align@0.1.3
| |   | `-- wordwrap@0.0.2
| |   `-- window-size@0.1.0
| `-- uglify-save-license@0.4.1
+-- gulp-useref@3.1.2
| +-- event-stream@3.3.4
| | +-- duplexer@0.1.1
| | +-- from@0.1.3
| | +-- map-stream@0.1.0
| | +-- pause-stream@0.0.11
| | +-- split@0.3.3
| | `-- stream-combiner@0.0.4
| +-- gulp-concat@2.6.0
| | +-- concat-with-sourcemaps@1.0.4
| | | `-- source-map@0.5.6
| | `-- through2@0.6.5
| +-- is-relative-url@1.0.0
| | `-- is-absolute-url@1.0.0
| +-- useref@1.2.0
| `-- vinyl-fs@2.4.3
|   +-- glob-stream@5.3.5
|   | +-- glob@5.0.15
|   | +-- glob-parent@3.0.0
|   | | `-- is-glob@3.0.0
|   | |   `-- is-extglob@2.0.0
|   | +-- ordered-read-streams@0.3.0
|   | +-- through2@0.6.5
|   | | `-- readable-stream@1.0.34
|   | |   `-- isarray@0.0.1
|   | `-- unique-stream@2.2.1
|   +-- readable-stream@2.1.5
|   | `-- isarray@1.0.0
|   `-- vinyl@1.2.0
+-- gulp-vulcanize@6.1.0
| `-- through2@2.0.1
|   `-- readable-stream@2.0.6
|     `-- isarray@1.0.0
+-- helmet@2.1.3
| +-- connect@3.4.1
| | `-- finalhandler@0.4.1
| +-- dns-prefetch-control@0.1.0
| +-- dont-sniff-mimetype@1.0.0
| +-- frameguard@2.0.0
| +-- helmet-csp@1.2.2
| | +-- camelize@1.0.0
| | +-- content-security-policy-builder@1.0.0
| | | `-- dashify@0.2.2
| | +-- lodash.reduce@4.5.0
| | `-- platform@1.3.1
| +-- hide-powered-by@1.0.0
| +-- hpkp@1.1.0
| +-- hsts@1.0.0
| +-- ienoopen@1.0.0
| +-- nocache@1.0.1
| `-- x-xss-protection@1.0.0
+-- jackrabbit@4.3.0
| +-- amqplib@0.4.0
| | +-- bitsyntax@0.0.4
| | +-- buffer-more-ints@0.0.2
| | +-- readable-stream@1.1.14
| | `-- when@3.6.4
| +-- lodash@3.10.1
| `-- node-uuid@1.4.7
+-- lodash@4.15.0
+-- loopback@2.32.0
| +-- async@2.0.1
| +-- canonical-json@0.0.4
| +-- cookie-parser@1.4.3
| | +-- cookie@0.3.1
| | `-- cookie-signature@1.0.6
| +-- depd@1.1.0
| +-- ejs@2.5.1
| +-- express@4.14.0
| | +-- array-flatten@1.1.1
| | +-- content-disposition@0.5.1
| | +-- finalhandler@0.5.0
| | +-- merge-descriptors@1.0.1
| | +-- methods@1.1.2
| | +-- path-to-regexp@0.1.7
| | +-- proxy-addr@1.1.2
| | | +-- forwarded@0.1.0
| | | `-- ipaddr.js@1.1.1
| | +-- qs@6.2.0
| | `-- range-parser@1.2.0
| +-- inflection@1.10.0
| +-- loopback-connector-remote@1.3.3
| +-- loopback-context@1.0.0
| | `-- continuation-local-storage@3.1.7
| |   +-- async-listener@0.6.3
| |   | `-- shimmer@1.0.0
| |   `-- emitter-listener@1.0.1
| +-- loopback-phase@1.4.0
| | `-- async@0.9.2
| +-- nodemailer@2.6.0
| | +-- libmime@2.1.0
| | | +-- libbase64@0.1.0
| | | `-- libqp@1.1.0
| | +-- mailcomposer@3.12.0
| | | `-- buildmail@3.10.0
| | |   `-- addressparser@1.0.1
| | +-- nodemailer-direct-transport@3.3.2
| | | `-- smtp-connection@2.12.0
| | |   `-- httpntlm@1.6.1
| | |     `-- httpreq@0.4.22
| | +-- nodemailer-shared@1.1.0
| | | `-- nodemailer-fetch@1.6.0
| | +-- nodemailer-smtp-pool@2.8.2
| | | `-- nodemailer-wellknown@0.1.10
| | +-- nodemailer-smtp-transport@2.7.2
| | `-- socks@1.1.9
| |   +-- ip@1.1.3
| |   `-- smart-buffer@1.0.11
| +-- nodemailer-stub-transport@1.1.0
| +-- stable@0.1.5
| +-- strong-globalize@2.6.10
| | +-- async@1.5.2
| | +-- esprima@2.7.3
| | +-- estraverse@4.2.0
| | +-- fs-sync@1.0.2
| | | +-- glob@4.5.3
| | | | `-- minimatch@2.0.10
| | | +-- iconv-lite@0.2.11
| | | `-- mkdirp@0.3.5
| | +-- g11n-pipeline@1.2.3
| | | `-- swagger-client@2.1.18
| | |   +-- btoa@1.1.2
| | |   +-- cookiejar@2.1.0
| | |   +-- lodash-compat@3.10.2
| | |   `-- superagent@1.8.4
| | |     +-- component-emitter@1.2.1
| | |     +-- cookiejar@2.0.6
| | |     +-- form-data@1.0.0-rc3
| | |     | +-- async@1.5.2
| | |     | +-- combined-stream@1.0.5
| | |     | | `-- delayed-stream@1.0.0
| | |     | `-- mime-types@2.1.11
| | |     |   `-- mime-db@1.23.0
| | |     +-- mime@1.3.4
| | |     `-- readable-stream@1.0.27-1
| | +-- md5@2.2.1
| | | +-- charenc@0.0.1
| | | `-- crypt@0.0.1
| | +-- mktmpdir@0.1.1
| | | `-- rimraf@2.2.8
| | +-- optional@0.1.3
| | +-- posix-getopt@1.2.0
| | +-- word-count@0.2.2
| | `-- yamljs@0.2.8
| |   `-- argparse@1.0.7
| +-- strong-remoting@2.31.0
| | +-- async@2.0.1
| | +-- eventemitter2@2.1.1
| | +-- jayson@1.2.2
| | | +-- commander@1.3.2
| | | | `-- keypress@0.1.0
| | | `-- lodash@3.6.0
| | +-- js2xmlparser@1.0.0
| | +-- mux-demux@3.7.9
| | | +-- duplex@1.0.0
| | | +-- json-buffer@2.0.11
| | | +-- msgpack-stream@0.0.12
| | | | +-- bops@0.0.6
| | | | | +-- base64-js@0.0.2
| | | | | `-- to-utf8@0.0.1
| | | | +-- msgpack-js@0.3.0
| | | | `-- through@2.3.4
| | | +-- stream-combiner@0.0.2
| | | | `-- duplexer@0.0.4
| | | +-- stream-serializer@1.1.2
| | | `-- xtend@1.0.3
| | +-- qs@6.2.1
| | +-- request@2.74.0
| | | +-- aws-sign2@0.6.0
| | | +-- aws4@1.4.1
| | | +-- bl@1.1.2
| | | | `-- readable-stream@2.0.6
| | | |   `-- isarray@1.0.0
| | | +-- caseless@0.11.0
| | | +-- combined-stream@1.0.5
| | | | `-- delayed-stream@1.0.0
| | | +-- forever-agent@0.6.1
| | | +-- form-data@1.0.1
| | | +-- hawk@3.1.3
| | | | +-- boom@2.10.1
| | | | +-- cryptiles@2.0.5
| | | | +-- hoek@2.16.3
| | | | `-- sntp@1.0.9
| | | +-- http-signature@1.1.1
| | | | +-- assert-plus@0.2.0
| | | | +-- jsprim@1.3.0
| | | | | +-- extsprintf@1.0.2
| | | | | +-- json-schema@0.2.2
| | | | | `-- verror@1.3.6
| | | | `-- sshpk@1.10.0
| | | |   +-- asn1@0.2.3
| | | |   +-- assert-plus@1.0.0
| | | |   +-- bcrypt-pbkdf@1.0.0
| | | |   | `-- tweetnacl@0.14.3
| | | |   +-- dashdash@1.14.0
| | | |   | `-- assert-plus@1.0.0
| | | |   +-- ecc-jsbn@0.1.1
| | | |   +-- getpass@0.1.6
| | | |   | `-- assert-plus@1.0.0
| | | |   +-- jodid25519@1.0.2
| | | |   +-- jsbn@0.1.0
| | | |   `-- tweetnacl@0.13.3
| | | +-- is-typedarray@1.0.0
| | | +-- mime-types@2.1.11
| | | | `-- mime-db@1.23.0
| | | `-- oauth-sign@0.8.2
| | +-- sse@0.0.6
| | | `-- options@0.0.6
| | `-- xml2js@0.4.17
| |   `-- xmlbuilder@4.2.1
| +-- uid2@0.0.3
| `-- underscore.string@3.3.4
|   `-- sprintf-js@1.0.3
+-- loopback-boot@2.22.0
| +-- async@0.9.2
| +-- commondir@0.0.1
| +-- lodash@3.10.1
| `-- toposort@0.2.12
+-- loopback-component-explorer@2.6.0
| +-- lodash@3.10.1
| +-- loopback-swagger@2.5.0
| | +-- async@1.5.2
| | +-- ejs@1.0.0
| | +-- lodash@3.10.1
| | `-- underscore.string@2.3.3
| `-- strong-swagger-ui@21.0.2
+-- loopback-connector-mongodb@1.15.2
| +-- async@1.5.2
| +-- loopback-connector@2.4.0
| | `-- async@1.5.2
| `-- mongodb@2.2.9
|   +-- mongodb-core@2.0.11
|   | +-- bson@0.5.4
|   | `-- require_optional@1.0.0
|   |   +-- resolve-from@2.0.0
|   |   `-- semver@5.3.0
|   `-- readable-stream@2.1.5
|     `-- isarray@1.0.0
+-- loopback-datasource-juggler@2.50.0
| +-- async@1.0.0
| +-- eslint@2.13.1
| | +-- doctrine@1.3.0
| | | `-- isarray@1.0.0
| | +-- es6-map@0.1.4
| | | +-- es6-set@0.1.4
| | | +-- es6-symbol@3.1.0
| | | `-- event-emitter@0.3.4
| | +-- escope@3.6.0
| | | +-- es6-weak-map@2.0.1
| | | `-- esrecurse@4.1.0
| | |   `-- estraverse@4.1.1
| | +-- espree@3.1.7
| | | +-- acorn@3.3.0
| | | `-- acorn-jsx@3.0.1
| | +-- esutils@2.0.2
| | +-- file-entry-cache@1.3.1
| | | `-- flat-cache@1.2.1
| | |   +-- circular-json@0.3.1
| | |   `-- write@0.2.1
| | +-- globals@9.9.0
| | +-- ignore@3.1.5
| | +-- imurmurhash@0.1.4
| | +-- inquirer@0.12.0
| | | +-- ansi-escapes@1.4.0
| | | +-- cli-cursor@1.0.2
| | | | `-- restore-cursor@1.0.1
| | | |   `-- exit-hook@1.1.1
| | | +-- cli-width@2.1.0
| | | +-- figures@1.7.0
| | | +-- readline2@1.0.1
| | | | `-- mute-stream@0.0.5
| | | +-- run-async@0.1.0
| | | `-- rx-lite@3.1.2
| | +-- is-my-json-valid@2.13.1
| | | +-- generate-function@2.0.0
| | | +-- generate-object-property@1.2.0
| | | | `-- is-property@1.0.2
| | | `-- jsonpointer@2.0.0
| | +-- is-resolvable@1.0.0
| | | `-- tryit@1.0.2
| | +-- js-yaml@3.6.1
| | +-- json-stable-stringify@1.0.1
| | +-- levn@0.3.0
| | | +-- prelude-ls@1.1.2
| | | `-- type-check@0.3.2
| | +-- optionator@0.8.1
| | | +-- deep-is@0.1.3
| | | +-- fast-levenshtein@1.1.4
| | | `-- wordwrap@1.0.0
| | +-- path-is-inside@1.0.1
| | +-- pluralize@1.2.1
| | +-- progress@1.1.8
| | +-- require-uncached@1.0.2
| | | +-- caller-path@0.1.0
| | | | `-- callsites@0.2.0
| | | `-- resolve-from@1.0.1
| | +-- shelljs@0.6.1
| | +-- strip-json-comments@1.0.4
| | +-- table@3.7.8
| | | +-- slice-ansi@0.0.4
| | | +-- tv4@1.2.7
| | | `-- xregexp@3.1.1
| | +-- text-table@0.2.0
| | `-- user-home@2.0.0
| +-- minimatch@3.0.3
| | `-- brace-expansion@1.1.6
| |   +-- balanced-match@0.4.2
| |   `-- concat-map@0.0.1
| +-- qs@3.1.0
| `-- traverse@0.6.6
+-- loopback-testing@1.3.0
| +-- async@0.9.2
| +-- chai@1.10.0
| | +-- assertion-error@1.0.0
| | `-- deep-eql@0.1.3
| |   `-- type-detect@0.1.1
| `-- supertest@0.13.0
|   +-- methods@1.0.0
|   `-- superagent@0.18.0
|     +-- component-emitter@1.1.2
|     +-- cookiejar@1.3.2
|     +-- debug@0.7.4
|     +-- extend@1.2.1
|     +-- form-data@0.1.2
|     | +-- async@0.2.10
|     | `-- mime@1.2.11
|     +-- formidable@1.0.14
|     +-- methods@0.0.1
|     +-- mime@1.2.5
|     +-- qs@0.6.6
|     +-- readable-stream@1.0.27-1
|     `-- reduce-component@1.0.1
+-- merge-stream@1.0.0
| `-- readable-stream@2.1.5
|   `-- isarray@1.0.0
+-- proquint@0.0.1
+-- require-dir@0.3.0
+-- run-sequence@1.2.2
+-- serve-favicon@2.3.0
| +-- etag@1.7.0
| +-- fresh@0.3.0
| +-- ms@0.7.1
| `-- parseurl@1.3.1
+-- vulcanize@1.14.8
| +-- dom5@1.3.4
| | +-- @types/clone@0.1.29
| | +-- @types/node@4.0.30
| | +-- @types/parse5@0.0.31
| | | `-- @types/node@6.0.38
| | `-- parse5@1.5.1
| +-- es6-promise@2.3.0
| +-- hydrolysis@1.24.1
| | +-- babel-polyfill@6.13.0
| | | +-- babel-runtime@6.11.6
| | | +-- core-js@2.4.1
| | | `-- regenerator-runtime@0.9.5
| | +-- doctrine@0.7.2
| | | `-- esutils@1.1.6
| | +-- escodegen@1.8.1
| | | +-- estraverse@1.9.3
| | | +-- esutils@2.0.2
| | | `-- source-map@0.2.0
| | `-- estraverse@3.1.0
| +-- nopt@3.0.6
| | `-- abbrev@1.0.9
| +-- path-posix@1.0.0
| `-- update-notifier@0.6.3
|   +-- boxen@0.3.1
|   | +-- filled-array@1.1.0
|   | +-- repeating@2.0.1
|   | | `-- is-finite@1.0.1
|   | `-- widest-line@1.0.0
|   +-- configstore@2.1.0
|   | +-- dot-prop@3.0.0
|   | | `-- is-obj@1.0.1
|   | +-- os-tmpdir@1.0.1
|   | +-- osenv@0.1.3
|   | +-- write-file-atomic@1.2.0
|   | | `-- slide@1.1.6
|   | `-- xdg-basedir@2.0.0
|   +-- is-npm@1.0.0
|   +-- latest-version@2.0.0
|   | `-- package-json@2.4.0
|   |   +-- got@5.6.0
|   |   | +-- create-error-class@3.0.2
|   |   | | `-- capture-stack-trace@1.0.0
|   |   | +-- duplexer2@0.1.4
|   |   | +-- is-plain-obj@1.1.0
|   |   | +-- is-redirect@1.0.0
|   |   | +-- is-retry-allowed@1.1.0
|   |   | +-- lowercase-keys@1.0.0
|   |   | +-- node-status-codes@1.0.0
|   |   | +-- readable-stream@2.1.5
|   |   | | `-- isarray@1.0.0
|   |   | +-- timed-out@2.0.0
|   |   | +-- unzip-response@1.0.0
|   |   | `-- url-parse-lax@1.0.0
|   |   |   `-- prepend-http@1.0.4
|   |   +-- registry-auth-token@3.0.1
|   |   | `-- rc@1.1.6
|   |   |   +-- deep-extend@0.4.1
|   |   |   `-- minimist@1.2.0
|   |   +-- registry-url@3.1.0
|   |   `-- semver@5.3.0
|   `-- semver-diff@2.1.0
|     `-- semver@5.3.0
+-- web-component-tester@4.3.4
| +-- accessibility-developer-tools@2.10.0
| +-- async@1.5.2
| +-- chai@3.5.0
| | +-- assertion-error@1.0.2
| | `-- type-detect@1.0.0
| +-- cleankill@1.0.3
| +-- findup-sync@0.2.1
| | `-- glob@4.3.5
| +-- glob@5.0.15
| | `-- minimatch@2.0.10
| +-- lodash@3.10.1
| +-- mocha@2.5.3
| | +-- commander@2.3.0
| | +-- diff@1.4.0
| | +-- escape-string-regexp@1.0.2
| | +-- glob@3.2.11
| | | `-- minimatch@0.3.0
| | |   +-- lru-cache@2.7.3
| | |   `-- sigmund@1.0.1
| | +-- growl@1.9.2
| | +-- jade@0.26.3
| | | +-- commander@0.6.1
| | | `-- mkdirp@0.3.0
| | +-- supports-color@1.2.0
| | `-- to-iso-string@0.0.2
| +-- multer@1.2.0
| | +-- append-field@0.1.0
| | +-- busboy@0.2.13
| | | +-- dicer@0.2.5
| | | | +-- readable-stream@1.1.14
| | | | `-- streamsearch@0.1.2
| | | `-- readable-stream@1.1.14
| | `-- object-assign@3.0.0
| +-- nomnom@1.8.1
| | +-- chalk@0.4.0
| | | +-- ansi-styles@1.0.0
| | | `-- strip-ansi@0.1.1
| | `-- underscore@1.6.0
| +-- promisify-node@0.4.0
| | `-- nodegit-promise@4.0.0
| |   `-- asap@2.0.4
| +-- resolve@1.1.7
| +-- send@0.11.1
| | +-- debug@2.1.3
| | +-- depd@1.0.1
| | +-- destroy@1.0.3
| | +-- escape-html@1.0.1
| | +-- etag@1.5.1
| | | `-- crc@3.2.1
| | +-- fresh@0.2.4
| | +-- ms@0.7.0
| | +-- on-finished@2.2.1
| | | `-- ee-first@1.1.0
| | `-- range-parser@1.0.3
| +-- serve-waterfall@1.1.1
| | `-- send@0.11.1
| |   +-- debug@2.1.3
| |   +-- depd@1.0.1
| |   +-- destroy@1.0.3
| |   +-- escape-html@1.0.1
| |   +-- etag@1.5.1
| |   +-- fresh@0.2.4
| |   +-- ms@0.7.0
| |   +-- on-finished@2.2.1
| |   | `-- ee-first@1.1.0
| |   `-- range-parser@1.0.3
| +-- sinon@1.17.5
| | +-- formatio@1.1.1
| | +-- lolex@1.3.2
| | `-- samsam@1.1.2
| +-- sinon-chai@2.8.0
| +-- stacky@1.3.1
| | `-- lodash@3.10.1
| +-- test-fixture@1.1.1 (git://github.com/polymerelements/test-fixture.git#05514d6f32ade6fe54de5b242bbb43ea9dcff3c0)
| +-- wct-local@2.0.11
| | +-- @types/chalk@0.4.28
| | +-- @types/express@4.0.32
| | | +-- @types/express-serve-static-core@4.0.33
| | | | `-- @types/node@6.0.38
| | | `-- @types/serve-static@1.7.30
| | |   `-- @types/mime@0.0.28
| | +-- @types/freeport@1.0.19
| | +-- @types/node@6.0.38
| | +-- @types/which@1.0.27
| | +-- freeport@1.0.5
| | +-- launchpad@0.5.3
| | | +-- async@1.5.2
| | | +-- browserstack@1.5.0
| | | | `-- https-proxy-agent@1.0.0
| | | |   `-- agent-base@2.0.1
| | | |     `-- semver@5.0.3
| | | +-- plist@1.2.0
| | | | +-- base64-js@0.0.8
| | | | +-- xmlbuilder@4.0.0
| | | | | `-- lodash@3.10.1
| | | | `-- xmldom@0.1.22
| | | +-- restify@4.1.1
| | | | +-- backoff@2.5.0
| | | | | `-- precond@0.2.3
| | | | +-- bunyan@1.8.1
| | | | | +-- moment@2.14.1
| | | | | +-- mv@2.1.1
| | | | | | +-- ncp@2.0.0
| | | | | | `-- rimraf@2.4.5
| | | | | |   `-- glob@6.0.4
| | | | | `-- safe-json-stringify@1.0.3
| | | | +-- csv@0.4.6
| | | | | +-- csv-generate@0.0.6
| | | | | +-- csv-parse@1.1.7
| | | | | +-- csv-stringify@0.0.8
| | | | | `-- stream-transform@0.1.1
| | | | +-- dtrace-provider@0.6.0
| | | | | `-- nan@2.4.0
| | | | +-- escape-regexp-component@1.0.2
| | | | +-- formidable@1.0.17
| | | | +-- http-signature@0.11.0
| | | | +-- keep-alive-agent@0.0.1
| | | | +-- lru-cache@4.0.1
| | | | | +-- pseudomap@1.0.2
| | | | | `-- yallist@2.0.0
| | | | +-- qs@3.1.0
| | | | +-- spdy@3.4.0
| | | | | +-- handle-thing@1.2.5
| | | | | +-- http-deceiver@1.2.7
| | | | | +-- select-hose@2.0.0
| | | | | `-- spdy-transport@2.0.14
| | | | |   +-- hpack.js@2.1.4
| | | | |   | `-- readable-stream@2.1.5
| | | | |   |   `-- isarray@1.0.0
| | | | |   +-- obuf@1.1.1
| | | | |   +-- readable-stream@2.1.5
| | | | |   | `-- isarray@1.0.0
| | | | |   `-- wbuf@1.7.2
| | | | +-- vasync@1.6.3
| | | | | `-- verror@1.6.0
| | | | |   `-- extsprintf@1.2.0
| | | | `-- verror@1.8.1
| | | |   +-- assert-plus@1.0.0
| | | |   `-- extsprintf@1.3.0
| | | `-- underscore@1.8.3
| | +-- selenium-standalone@5.6.2
| | | +-- async@1.2.1
| | | +-- commander@2.6.0
| | | +-- lodash@3.9.3
| | | +-- minimist@1.1.0
| | | +-- mkdirp@0.5.0
| | | | `-- minimist@0.0.8
| | | +-- urijs@1.16.1
| | | +-- which@1.1.1
| | | | `-- is-absolute@0.1.7
| | | |   `-- is-relative@0.1.3
| | | `-- yauzl@2.6.0
| | |   `-- fd-slicer@1.0.1
| | |     `-- pend@1.2.0
| | `-- which@1.2.11
| |   `-- isexe@1.1.2
| +-- wct-sauce@1.8.4
| | +-- lodash@3.10.1
| | +-- request@2.74.0
| | | +-- aws-sign2@0.6.0
| | | +-- bl@1.1.2
| | | | `-- readable-stream@2.0.6
| | | |   `-- isarray@1.0.0
| | | +-- caseless@0.11.0
| | | +-- combined-stream@1.0.5
| | | | `-- delayed-stream@1.0.0
| | | +-- forever-agent@0.6.1
| | | +-- form-data@1.0.1
| | | | `-- async@2.0.1
| | | |   `-- lodash@4.15.0
| | | +-- hawk@3.1.3
| | | | +-- boom@2.10.1
| | | | +-- cryptiles@2.0.5
| | | | +-- hoek@2.16.3
| | | | `-- sntp@1.0.9
| | | +-- http-signature@1.1.1
| | | | `-- assert-plus@0.2.0
| | | +-- mime-types@2.1.11
| | | | `-- mime-db@1.23.0
| | | +-- oauth-sign@0.8.2
| | | `-- qs@6.2.1
| | +-- sauce-connect-launcher@0.14.0
| | | +-- adm-zip@0.4.7
| | | +-- async@1.4.0
| | | +-- lodash@3.10.1
| | | `-- rimraf@2.4.3
| | |   `-- glob@5.0.15
| | +-- temp@0.8.3
| | | `-- rimraf@2.2.8
| | `-- uuid@2.0.2
| `-- wd@0.3.12
|   +-- archiver@0.14.4
|   | +-- async@0.9.2
|   | +-- buffer-crc32@0.2.5
|   | +-- glob@4.3.5
|   | | `-- minimatch@2.0.10
|   | +-- lazystream@0.1.0
|   | +-- lodash@3.2.0
|   | +-- tar-stream@1.1.5
|   | | `-- end-of-stream@1.1.0
|   | `-- zip-stream@0.5.2
|   |   +-- compress-commons@0.2.9
|   |   | +-- crc32-stream@0.3.4
|   |   | `-- node-int64@0.3.3
|   |   `-- lodash@3.2.0
|   +-- async@1.0.0
|   +-- lodash@3.9.3
|   +-- q@1.4.1
|   +-- request@2.55.0
|   | +-- caseless@0.9.0
|   | +-- forever-agent@0.6.1
|   | +-- har-validator@1.8.0
|   | | +-- bluebird@2.11.0
|   | | `-- commander@2.9.0
|   | +-- hawk@2.3.1
|   | | +-- boom@2.10.1
|   | | +-- cryptiles@2.0.5
|   | | +-- hoek@2.16.3
|   | | `-- sntp@1.0.9
|   | +-- oauth-sign@0.6.0
|   | `-- qs@2.4.2
|   +-- underscore.string@3.0.3
|   `-- vargs@0.1.0
`-- winston@2.2.0
  +-- async@1.0.0
  +-- colors@1.0.3
  +-- cycle@1.0.3
  +-- eyes@0.1.8
  +-- isstream@0.1.2
  +-- pkginfo@0.3.1
  `-- stack-trace@0.0.9

npm ERR! extraneous: brfs@1.4.3 C:\Users\Nigel\Desktop\envoy-polymer\node_modules\brfs

@klarkc and my terminal truncated some

@klarkc
Copy link
Owner Author

@klarkc klarkc commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigeltiany that winston is not in our package.json, try remove it: $ npm uninstall winston. Maybe a better way is to clean node_modules, reload package.json from this repo and install all again with npm install

@nigeltiany
Copy link

@nigeltiany nigeltiany commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It causes problems working without it. Running gulp lbclient throws errors

    at C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:46:17
    at process (C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:173:43)
    at ondir (C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:188:17)
    at load (C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:69:43)
    at onex (C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:92:31)
    at C:\Users\Nigel\Desktop\envoy-polymer\node_modules\resolve\lib\async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

Why do you suspect pkginfo@0.3.1? @klarkc

@klarkc
Copy link
Owner Author

@klarkc klarkc commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, Loopback does not use the fs module in the client environment, so this pkginfo is the only module that tries to use fs in client, throwing the error. The thing is, you don't need this module (pkginfo) in your client if it's not being used by loopback, maybe this cause an overhead of modules in your bundle (You said before that your bundle is 100k > lines, my bundle has ~80k of lines).

I am guessing that, pkginfo is only used by this winston package, that I don't know why is being bundled in the client. Some script is requiring this module in client/loopback directory or commondirectory.

You have two ways to fix this, use brfs or remove the modules that tries to use fs module.

@klarkc
Copy link
Owner Author

@klarkc klarkc commented on 662ac70 Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe related: winstonjs/winston#287

@nigeltiany
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @klarkc. For your time, patience and knowledge. I appreciate. I'll look into this and let you know when i fix it.

Please sign in to comment.