Polymer lint reports an error as simply [object Object]
Not sure, since it is an error in my app, and the error message is unintelligible.
Useful error message.
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]
~~~~~~~~~~~~
index.html(172,4) warning [undefined-elements] - The element ant-config is not defined
~~~~~~~~~
index.html(173,4) warning [undefined-elements] - The element ant-app is not defined
Found 1 errors 2 warnings.
maxw@maxw-master$
@davidmaxwaterman really appreciate the cleanly formatted OP :)
@rictic any idea what this could be? I don't see any data missing from the output, It might just be a stray console.log that made it into the command.
If there are any debugging steps you can suggest, I'm up for it. Unfortunately, I can't share my app.
I presumed that the [object Object] is what the error is in Found 1 errors 2 warnings - the 2 warnings are accounted for (custom elements in my index.html that I lazy load [it'd be nice to be able to 'comment those away' somehow]).
@davidmaxwaterman oh yea you're right, I counted those wrong.
I'm seeing the same issue:
$ polymer lint
[object Object]
[object Object]
Found 2 errors.
If I am adding the files as input to the lint command it works.
root@49aaf5821862:/var/www# polymer lint -i $(find src/ -not -type d)
root@49aaf5821862:/var/www# echo $?
0
root@49aaf5821862:/var/www#
But if you don't skip the directories you get the error.
root@49aaf5821862:/var/www# polymer lint -i $(find src/)
[object Object]
[object Object]
Found 2 errors.
We've run into the same issue yesterday. Running polymer lint just returns
[object Object]
[object Object]
Found 2 errors.
Any news on this?
Maybe related? https://github.com/Polymer/polymer-linter/issues/87
Same here.
We are getting the [object objct] when we run polymer lint too.
Getting this error when running polymer lint on a directory, or using globs. Here is my repo: https://github.com/patkub/rmc1891-site/
polymer lint --input src/
[object Object]
Found 1 errors.
The only html file present in src/ is rmc-shell.html. Linting that file explicitly works without any errors.
polymer lint --input src/rmc-shell.html.
But, using globs results in the same error message.
polymer lint --input src/*.html
[object Object]
Found 1 errors.
same error..
[object Object]
[object Object]
[object Object]
Found 3 errors.
Same here
[object Object]
[object Object]
[object Object]
[object Object]
[object Object]
Found 5 errors.
Same here
[object Object]
@rictic I wonder if this could be introduced in warning-printer refactoring here?
same issue here too :(
but when I try
polymer lint --input src/*.html
or this if you have a subfolder
polymer lint --input src/**/*.html
it works without any errors
maybe the polymer lint is including the object content from some JSON file.
This error also affects my automatic CI test result.
+1
@rictic can you check this out?
In my case, this was happening due to my bower.json having an extraneous comma in its dependencies object, thereby causing it to be invalid JSON. Fixing my bower.json got rid of the [Object object] error.
Update from the present. I had the issue when using iron-ajax which parsed an erroneous json file. My theory is that polymer lint does not like at all to read a wrong json file (for example with extra commas, etc...)
I fixed my json files and everything worked right
In my case, there were comments in my firestore.indexes.json file. Removing the comments, made the json file valid.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
.