tools: polymer lint gives error as '[object Object]'
Description
Polymer lint reports an error as simply [object Object]
Versions & Environment
- Polymer CLI: 1.0.2
- node: v7.8.0
- Operating System: WSL
Steps to Reproduce
Not sure, since it is an error in my app, and the error message is unintelligible.
Expected Results
Useful error message.
Actual Results
maxw@maxw-master$ polymer lint --verbose
debug: got args:
{ args: [ 'lint', '--verbose' ] }
debug: got default config from polymer.json file:
{ config:
{ entrypoint: 'index.html',
shell: 'src/ant-app.html',
fragments: [ 'src/ant-config.html', 'src/ant-app.html' ],
sources: [ 'src/**/*', 'images/**/*', 'bower.json' ],
extraDependencies:
[ 'manifest.json',
'bower_components/webcomponentsjs/webcomponents-lite.min.js',
'node_modules/redux/dist/redux.min.js' ],
lint: { rules: [ 'polymer-1' ] } } }
debug: adding command analyze
debug: adding command build
debug: adding command help
debug: adding command init
debug: adding command install
debug: adding command lint
debug: adding command serve
debug: adding command test
debug: running...
debug: command 'lint' found, parsing command args:
{ args: [ '--verbose' ] }
debug: command options parsed from args:
{ verbose: true }
debug: final project configuration generated:
{ lint: { rules: [ 'polymer-1' ] },
root: '/mnt/c/Users/David/Development/z/antenna/maxw-master',
entrypoint: '/mnt/c/Users/David/Development/z/antenna/maxw-master/index.html',
shell: '/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html',
fragments:
[ '/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-config.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html' ],
extraDependencies:
[ '/mnt/c/Users/David/Development/z/antenna/maxw-master/manifest.json',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/bower_components/webcomponentsjs/webcomponents-lite.min.js',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/node_modules/redux/dist/redux.min.js',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/bower_components/webcomponentsjs/*.js' ],
sources:
[ '/mnt/c/Users/David/Development/z/antenna/maxw-master/src/**/*',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/images/**/*',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/bower.json',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/index.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-config.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html' ],
allFragments:
[ '/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-config.html',
'/mnt/c/Users/David/Development/z/antenna/maxw-master/src/ant-app.html' ] }
debug: Running command...
[object Object]
<ant-config></ant-config>
~~~~~~~~~~~~
index.html(172,4) warning [undefined-elements] - The element ant-config is not defined
<ant-app></ant-app>
~~~~~~~~~
index.html(173,4) warning [undefined-elements] - The element ant-app is not defined
Found 1 errors 2 warnings.
maxw@maxw-master$
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 23 (5 by maintainers)
Commits related to this issue
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, but this isn't valid. Warning is a class now and... — committed to Polymer/polymer-analyzer by rictic 7 years ago
- Fix reporting of internal error. (#741) * Fix reporting of internal error. Likely related to https://github.com/Polymer/polymer-cli/issues/768 Previously we were casting an object to Warning, b... — committed to Polymer/polymer-analyzer by rictic 7 years ago
In my case, this was happening due to my
bower.jsonhaving an extraneous comma in itsdependenciesobject, thereby causing it to be invalid JSON. Fixing mybower.jsongot rid of the[Object object]error.same error…
[object Object]
[object Object]
[object Object]
Found 3 errors.