Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development process unclear? #174

Open
wilg opened this issue Jun 25, 2018 · 5 comments
Open

Development process unclear? #174

wilg opened this issue Jun 25, 2018 · 5 comments

Comments

@wilg
Copy link

wilg commented Jun 25, 2018

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!

› npm run test-node          

> oboe@2.1.4 test-node /Users/wil/Code/oboe.js
> jasmine JASMINE_CONFIG_PATH=jasmine.json

platform detection: { isNode: true, isInternetExplorer: false, isPhantom: false }
Started
.(node:56536) [DEP0016] DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
Fevents.js:136
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:4567
    at Object._errnoException (util.js:999:13)
    at _exceptionWithHostPort (util.js:1020:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1207:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oboe@2.1.4 test-node: `jasmine JASMINE_CONFIG_PATH=jasmine.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the oboe@2.1.4 test-node script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wil/.npm/_logs/2018-06-25T23_05_21_281Z-debug.log
› npm run webpack

> oboe@2.1.4 webpack /Users/wil/Code/oboe.js
> webpack

sh: webpack: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! oboe@2.1.4 webpack: `webpack`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the oboe@2.1.4 webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wil/.npm/_logs/2018-06-25T23_07_00_144Z-debug.log
› npm test

Running "clean:0" (clean) task

Running "clean:1" (clean) task

Running "start-stream-source" task
>> do we have a streaming source already? false

Running "karma:single-dev" (karma) task
25 06 2018 16:07:33.458: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
npm ERR! Test failed.  See above for more details.
› npm run webpack

> oboe@2.1.4 webpack /Users/wil/Code/oboe.js
> webpack

sh: webpack: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! oboe@2.1.4 webpack: `webpack`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the oboe@2.1.4 webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wil/.npm/_logs/2018-06-25T23_08_16_692Z-debug.log
@Aigeec
Copy link
Collaborator

Aigeec commented Jun 25, 2018

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.

@wilg
Copy link
Author

wilg commented Jun 25, 2018

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

@Aigeec
Copy link
Collaborator

Aigeec commented Jun 25, 2018 via email

@wilg
Copy link
Author

wilg commented Jun 25, 2018

Thanks!

@Aigeec
Copy link
Collaborator

Aigeec commented Jun 26, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants