Esri / esri-leaflet

A lightweight set of tools for working with ArcGIS services in Leaflet. :rocket:
https://developers.arcgis.com/esri-leaflet/
Apache License 2.0
1.61k stars 799 forks source link

Karma && eslint problems #853

Closed hamhands closed 7 years ago

hamhands commented 8 years ago

Steps to reproduce the error:

  1. npm test
  2. npm install

What happens is:

hamhands:esri-leaflet patr8559$ npm test

> esri-leaflet@2.0.3 pretest /Users/patr8559/Documents/esri-leaflet
> npm run build

> esri-leaflet@2.0.3 prebuild /Users/patr8559/Documents/esri-leaflet
> mkdirp dist

> esri-leaflet@2.0.3 build /Users/patr8559/Documents/esri-leaflet
> rollup -c profiles/debug.js & rollup -c profiles/production.js

> esri-leaflet@2.0.3 test /Users/patr8559/Documents/esri-leaflet
> npm run lint && karma start

> esri-leaflet@2.0.3 lint /Users/patr8559/Documents/esri-leaflet
> semistandard src/**/*.js | snazzy

DEBUG [config]: autoWatch set to false, because of singleRun
DEBUG [plugin]: Loading karma-* from /Users/patr8559/Documents/esri-leaflet/node_modules
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-chai-sinon.
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-coverage.
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-mocha.
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-mocha-reporter.
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-phantomjs-launcher.
DEBUG [plugin]: Loading plugin /Users/patr8559/Documents/esri-leaflet/node_modules/karma-sourcemap-loader.
DEBUG [preprocessor.sourcemap]: base64-encoded source map for /Users/patr8559/Documents/esri-leaflet/dist/esri-leaflet-debug.js
DEBUG [preprocessor.coverage]: Processing "/Users/patr8559/Documents/esri-leaflet/dist/esri-leaflet-debug.js".
DEBUG [preprocessor.coverage]: Enabling source map generation for "/Users/patr8559/Documents/esri-leaflet/dist/esri-leaflet-debug.js".
DEBUG [preprocessor.coverage]: Adding source map to instrumented file for "/Users/patr8559/Documents/esri-leaflet/dist/esri-leaflet-debug.js".
DEBUG [watcher]: Resolved files:
    /Users/patr8559/Documents/esri-leaflet/node_modules/sinon/pkg/sinon.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/chai/chai.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/sinon-chai/lib/sinon-chai.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/karma-chai-sinon/adapter.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/mocha/mocha.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/karma-mocha/lib/adapter.js
    /Users/patr8559/Documents/esri-leaflet/node_modules/leaflet/dist/leaflet.css
    /Users/patr8559/Documents/esri-leaflet/node_modules/leaflet/dist/leaflet-src.js
    /Users/patr8559/Documents/esri-leaflet/dist/esri-leaflet-debug.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/BasemapLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/DynamicMapLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/ImageMapLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/TiledMapLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/FeatureLayer/FeatureLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Layers/FeatureLayer/FeatureManagerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Services/FeatureLayerSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Services/ServiceSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Tasks/FindSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Tasks/IdentifyFeaturesSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Tasks/IdentifyImageSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/Tasks/QuerySpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/RequestSpec.js
    /Users/patr8559/Documents/esri-leaflet/spec/UtilSpec.js
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
DEBUG [temp-dir]: Creating temp dir at /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
DEBUG [launcher]: /Users/patr8559/Documents/esri-leaflet/node_modules/phantomjs/lib/phantom/bin/phantomjs /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js
DEBUG [launcher]: Process PhantomJS exited with code 0
ERROR [launcher]: Cannot start PhantomJS

DEBUG [temp-dir]: Cleaning temp dir /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
INFO [launcher]: Trying to start PhantomJS again (1/2).
DEBUG [launcher]: Restarting PhantomJS
DEBUG [temp-dir]: Creating temp dir at /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
DEBUG [launcher]: /Users/patr8559/Documents/esri-leaflet/node_modules/phantomjs/lib/phantom/bin/phantomjs /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js
DEBUG [launcher]: Process PhantomJS exited with code 0
ERROR [launcher]: Cannot start PhantomJS

DEBUG [temp-dir]: Cleaning temp dir /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
INFO [launcher]: Trying to start PhantomJS again (2/2).
DEBUG [launcher]: Restarting PhantomJS
DEBUG [temp-dir]: Creating temp dir at /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
DEBUG [launcher]: /Users/patr8559/Documents/esri-leaflet/node_modules/phantomjs/lib/phantom/bin/phantomjs /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514/capture.js
DEBUG [launcher]: Process PhantomJS exited with code 0
ERROR [launcher]: Cannot start PhantomJS

DEBUG [temp-dir]: Cleaning temp dir /var/folders/n0/l19fp6dd2bj4mznm492bp6jhm2c55t/T/karma-65243514
ERROR [launcher]: PhantomJS failed 2 times (cannot start). Giving up.

Finished in 0 secs / 0 secs

DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
npm ERR! Test failed.  See above for more details.
hamhands:esri-leaflet patr8559$ npm install

> esri-leaflet@2.0.3 prepublish /Users/patr8559/Documents/esri-leaflet
> npm run build

> esri-leaflet@2.0.3 prebuild /Users/patr8559/Documents/esri-leaflet
> mkdirp dist

> esri-leaflet@2.0.3 build /Users/patr8559/Documents/esri-leaflet
> rollup -c profiles/debug.js & rollup -c profiles/production.js

npm WARN eslint-config-standard@5.3.1 requires a peer of eslint@^2.0.0-rc.0 but none was installed.
npm WARN eslint-config-standard-jsx@1.2.0 requires a peer of eslint@^2.0.0-rc.0 but none was installed.
jgravois commented 8 years ago

this is reproducible after blowing away the node_modules folder and running a fresh npm install correct? what version of node? npm?

node --version
npm --version

also, since the problem is that PhantomJS can't be started, can you let me know whether installing the dependencies of Esri Leaflet is what really lays it down or whether the install routine is identifying a previous installation that is accessible via your $PATH?

hamhands commented 8 years ago

Correct.

A previous installation of what specifically?

jgravois commented 8 years ago

A previous installation of what specifically?

PhantomJS.

to be honest, our test suite is only relatively stable on Node 4.x and fundamentally broken on 6.x. given that you're currently floating halfway between, i'd recommend rolling back to 4.x if you'd like to set up an environment where you can contribute easily.

i have a hunch we may still have to tackle more issues with your PhantomJS setup afterward, but for now i'll just cross my fingers.

hamhands commented 8 years ago

I mean it's not in my path, but the modules are showing up in the project folder.

Rolled back to 4.6.0, got this when I tried to install again:

hamhands:esri-leaflet patr8559$ npm install

> fsevents@1.0.14 install /Users/patr8559/Documents/esri-leaflet/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/patr8559/Documents/esri-leaflet/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> spawn-sync@1.0.15 postinstall /Users/patr8559/Documents/esri-leaflet/node_modules/spawn-sync
> node postinstall

> ws@0.4.32 install /Users/patr8559/Documents/esri-leaflet/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o

> esri-leaflet@2.0.3 prepublish /Users/patr8559/Documents/esri-leaflet
> npm run build

> esri-leaflet@2.0.3 prebuild /Users/patr8559/Documents/esri-leaflet
> mkdirp dist

> esri-leaflet@2.0.3 build /Users/patr8559/Documents/esri-leaflet
> rollup -c profiles/debug.js & rollup -c profiles/production.js

npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/patr8559/.nvm/versions/node/v4.6.0/bin/node" "/Users/patr8559/.nvm/versions/node/v4.6.0/bin/npm" "install"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.9
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package eslint@1.10.3 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer eslint-config-standard@5.3.1 wants eslint@^2.0.0-rc.0
npm ERR! peerinvalid Peer eslint-config-standard-jsx@1.2.0 wants eslint@^2.0.0-rc.0

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/patr8559/Documents/esri-leaflet/npm-debug.log
hamhands commented 8 years ago

Ok, nuked the modules, and npm install ran fine.

npm test returns same error on PhantomJS as above.

jgravois commented 8 years ago

two action items

jgravois commented 8 years ago

is there anything i can help with to confirmPhantomJS is functioning on your machine @hamhands?

hamhands commented 8 years ago

@jgravois screenshare? 💻

hamhands commented 7 years ago

Found a clue and I think upgrading to "karma-phantomjs-launcher": "^1.0.2" fixes the issue. PhantomJS launches anyway.

jgravois commented 7 years ago

upgrading to "karma-phantomjs-launcher": "^1.0.2" fixes the issue.

PR please!

hamhands commented 7 years ago

Will do tomorrow! On Wed, Nov 30, 2016 at 7:43 PM john gravois notifications@github.com wrote:

upgrading to "karma-phantomjs-launcher": "^1.0.2" fixes the issue.

PR please!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Esri/esri-leaflet/issues/853#issuecomment-264071016, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeN4HibzwwCris7A633slEX97xzPkHlks5rDkJqgaJpZM4KF_OE .