Open wilg opened 6 years ago
In general things are actually all run from grunt. The npm scripts are misleading, this I believe being written before npm scripts came into main stream usage. The scripts that are there are actually run by grunt tasks.
The Error: connect ECONNREFUSED 127.0.0.1:4567
errors you see are because the test generally expect there to be a stream source available. You can prefix your grunt tasks with the start-stream-source
task
So for example if you were running the main browser build it would be something like:
grunt start-stream-source headless-mode karma:single-dev
Others would be
grunt start-stream-source headless-mode karma:single-dev
grunt start-stream-source headless-mode karma:single-http
grunt start-stream-source headless-mode karma:single-browser-http
grunt start-stream-source headless-mode karma:single-minified
grunt start-stream-source headless-mode browser-build karma:single-minified
grunt start-stream-source headless-mode browser-build karma:single-browser-http
All referring to various grunt tasks.
Checkout the Gruntfile.js for the list of available tasks.
Ah, OK, I'm not super familiar with grunt.
Still some issues: I'm not sure how to get grunt-cli
installed. It's in node_modules
and I also tried npm install -g grunt-cli
and npm install grunt-cli --save-dev
and ./node_modules/.bin/grunt start-stream-source headless-mode karma:single-dev
.
Is there a particular version of Node that is required? I'm using v9.3.0
but can use nvm
to switch to another. Doesn't look like there's an engine
in package.json
.
› grunt start-stream-source headless-mode karma:single-dev
>> Local Npm module "grunt-cli" not found. Is it installed?
Running "start-stream-source" task
>> do we have a streaming source already? false
Running "headless-mode" task
Running "karma:single-dev" (karma) task
25 06 2018 16:33:13.161:ERROR [plugin]: Error during loading "/Users/wil/Code/oboe.js/node_modules/karma-phantomjs-launcher" plugin:
The "path" argument must be of type string
Hash: de638abdc3d523f0bc87
Version: webpack 3.12.0
Time: 70ms
webpack: Compiled successfully.
webpack: Compiling...
Fatal error: Error parsing /Users/wil/Code/oboe.js/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/snapdragon/node_modules/define-property/node_modules/is-descriptor/node_modules/kind-of/package.json: Unexpected end of JSON input
The grunt-cli message you can ignore.
v9 would be higher than I was using. Believe I was using v6 at the time.
I will do a clean checkout of it myself tomorrow and see if any updates are causing issues.
A
On Tue 26 Jun 2018, 00:36 Wil Gieseler, notifications@github.com wrote:
Ah, OK, I'm not super familiar with grunt.
Still some issues: I'm not sure how to get grunt-cli installed. It's in node_modules and I also tried npm install -g grunt-cli and npm install grunt-cli --save-dev and ./node_modules/.bin/grunt start-stream-source headless-mode karma:single-dev.
Is there a particular version of Node that is required? I'm using v9.3.0 but can use nvm to switch to another. Doesn't look like there's an engine in package.json.
› grunt start-stream-source headless-mode karma:single-dev
Local Npm module "grunt-cli" not found. Is it installed?
Running "start-stream-source" task
do we have a streaming source already? false
Running "headless-mode" task
Running "karma:single-dev" (karma) task 25 06 2018 16:33:13.161:ERROR [plugin]: Error during loading "/Users/wil/Code/oboe.js/node_modules/karma-phantomjs-launcher" plugin: The "path" argument must be of type string Hash: de638abdc3d523f0bc87 Version: webpack 3.12.0 Time: 70ms webpack: Compiled successfully. webpack: Compiling... Fatal error: Error parsing /Users/wil/Code/oboe.js/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/anymatch/node_modules/micromatch/node_modules/snapdragon/node_modules/define-property/node_modules/is-descriptor/node_modules/kind-of/package.json: Unexpected end of JSON input
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jimhigson/oboe.js/issues/174#issuecomment-400128478, or mute the thread https://github.com/notifications/unsubscribe-auth/AE207hYq-_aht07NzHnAYIuN3AK_oKEyks5uAXPfgaJpZM4U2_hQ .
Thanks!
With node version v6.11.4 clean install based on oboe.js master the command grunt start-stream-source headless-mode karma:single-dev
works
26 06 2018 22:27:31.461:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
26 06 2018 22:27:31.466:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
26 06 2018 22:27:31.482:INFO [launcher]: Starting browser PhantomJS
26 06 2018 22:27:33.045:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket /#XU6usJp2Cm1DkbMoAAAA with id 87092015
PhantomJS 2.1.1 (Linux 0.0.0) LOG: 'platform detection:', Object{isNode: false, isInternetExplorer: undefined, isPhantom: true}
PhantomJS 2.1.1 (Linux 0.0.0): Executed 436 of 436 SUCCESS (0.535 secs / 0.469 secs)
Done, without errors.
I'm not certain if I'm doing something dumb, but I was just trying to get set up locally. I cloned and ran
npm install
and none of the tests seem to work. I'm not exactly sure what the intended dev workflow is. Is there documentation somewhere?Are there unspecified dependencies or something? Stuff that needs to be installed globally? It's not obvious to me why the various scripts are failing – for example
npm run webpack
fails but the webpack package is in my node_modules folder but does not have a corresponding entry in.bin
.I have some familiarity with the various test runners that are in use, and I'll keep poking around but if anyone has any guidance that would be helpful!