Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

A big revamp #84

Merged
merged 43 commits into from Jul 12, 2018
Merged

A big revamp #84

merged 43 commits into from Jul 12, 2018

Conversation

dschreij
Copy link
Collaborator

@dschreij dschreij commented Jun 9, 2018

It's been quite a while since the last PR, so a lot has happened. My main focus has been on imposing a structure on how we code, and make sure this is (gently) enforced. I also reworked the transfer module to let it use pako instead of gzip to decompress osexp files (pako is much more npm/node friendly). Lastly, I have updated all dependencies, so deleting the node_modules folder completely and reinstalling everything with npm install is highly recommended! To summarize

  • I have added an eslint configuration to enable javascript linting. I highly recommend you to use VSCode as your editor, or otherwise any other editor that supports and automatically pickups up eslint config files
  • Updated all node modules to the most recent versions
  • Rewrote transfer module to use pako for decompressing files, and 'untangled' the function chaining by the new using async/await structure.
  • Replaced mocha with jest as the testing framework (much easier to set up and maintain; built by facebook, so it is sure to be maintained for a while).
  • Extended the test battery with tests for the transfer module (still in progress)
  • Added automatic runs of tests on a push to github (so no faulty code is pushed).
  • Enabled Travis CI for continuous integration: after having been pushed, the test battery is run (again) and the status is reported behind the relevant push or PR.

@smathot smathot self-requested a review July 12, 2018 09:18
Copy link
Collaborator

@smathot smathot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can succesfully build. However, the unit test fails. This is with a clean npm install on Ubuntu 18.04.

osweb (revamp)$ npm test

> osweb@1.0.1 test /home/sebastiaan/git/osweb
> jest

 FAIL  src/js/tests/classes/syntax.test.js
  ● Test suite failed to run

    TypeError: Cannot set property 'fillStyle' of null

    > 1 | import * as PIXI from 'pixi.js'
        | ^
      2 | import {
      3 |   constants
      4 | } from './constants.js'

      at createWhiteTexture (node_modules/pixi.js/src/core/textures/Texture.js:638:5)
      at Object.<anonymous> (node_modules/pixi.js/src/core/textures/Texture.js:670:17)
      at Object.<anonymous> (node_modules/pixi.js/src/core/sprites/Sprite.js:4:1)
      at Object.<anonymous> (node_modules/pixi.js/lib/core/index.js:93:15)
      at Object.<anonymous> (node_modules/pixi.js/lib/index.js:18:13)
      at Object.<anonymous> (src/js/osweb/system/runner.js:1:1)
      at Object.<anonymous> (src/js/osweb/index.js:15:1)
      at Object.<anonymous> (src/js/tests/classes/syntax.test.js:4:1)

 PASS  src/js/tests/system/transfer.test.js
 PASS  src/js/tests/system/util.test.js
 FAIL  src/js/tests/backends/canvas.test.js
  ● Test suite failed to run

    TypeError: Cannot set property 'fillStyle' of null

    > 1 | import * as PIXI from 'pixi.js'
        | ^
      2 | import Styles from './styles.js'
      3 | 
      4 | /** Class representing a drawing canvas. */

      at createWhiteTexture (node_modules/pixi.js/src/core/textures/Texture.js:638:5)
      at Object.<anonymous> (node_modules/pixi.js/src/core/textures/Texture.js:670:17)
      at Object.<anonymous> (node_modules/pixi.js/src/core/sprites/Sprite.js:4:1)
      at Object.<anonymous> (node_modules/pixi.js/lib/core/index.js:93:15)
      at Object.<anonymous> (node_modules/pixi.js/lib/index.js:18:13)
      at Object.<anonymous> (src/js/osweb/backends/canvas.js:1:1)
      at Object.<anonymous> (src/js/tests/backends/canvas.test.js:3:1)

Test Suites: 2 failed, 2 passed, 4 total
Tests:       9 passed, 9 total
Snapshots:   0 total
Time:        10.744s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

@dschreij
Copy link
Collaborator Author

dschreij commented Jul 12, 2018

Strange! This appears to be related to the PIXI library.
This issue is mentioned here: pixijs/pixijs#4769 but it's weird that I haven't experienced it on Windows, Mac or Ubuntu 18.04 myself...
What version of node are you using? You can check that with node -v in the terminal.

@dschreij
Copy link
Collaborator Author

It appears to be caused by a missing canvas-prebuilt module, but it is present among the devDependencies in package.json so it should have been installed. Have you tried executing npm install && npm update again, or do a fresh install by deleting the node_modules folder first?

@smathot
Copy link
Collaborator

smathot commented Jul 12, 2018

I'm running the standard node packaged of Ubuntu 18.04. I indeed first removed node_modules and then did a clean npm install, which worked without trouble.

osweb (ovp_example)$ node -v
v8.10.0
osweb (revamp)$ rm -Rf node_modules/
osweb (revamp)$ npm install
npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm WARN prefer global node-gyp@3.7.0 should be installed with -g

> canvas-prebuilt@1.6.5-prerelease.1 install /home/sebastiaan/git/osweb/node_modules/canvas-prebuilt
> node-pre-gyp install

[canvas-prebuilt] Success: "/home/sebastiaan/git/osweb/node_modules/canvas-prebuilt/canvas/build/Release/canvas-prebuilt.node" is installed via remote

> husky@1.0.0-rc.13 install /home/sebastiaan/git/osweb/node_modules/husky
> node husky install

husky > setting up git hooks
husky > done

> node-sass@4.9.2 install /home/sebastiaan/git/osweb/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/sebastiaan/.npm/node-sass/4.9.2/linux-x64-57_binding.node

> eslint-scope@3.7.2 postinstall /home/sebastiaan/git/osweb/node_modules/eslint-scope
> node ./lib/build.js


> node-sass@4.9.2 postinstall /home/sebastiaan/git/osweb/node_modules/node-sass
> node scripts/build.js

Binary found at /home/sebastiaan/git/osweb/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
osweb@1.0.1 /home/sebastiaan/git/osweb
├─┬ @babel/core@7.0.0-beta.53 
│ ├─┬ @babel/code-frame@7.0.0-beta.53 
│ │ └── @babel/highlight@7.0.0-beta.53 
│ ├─┬ @babel/generator@7.0.0-beta.53 
│ │ ├── jsesc@2.5.1 

... lots of output

  └─┬ yargs@11.0.0 
    ├─┬ cliui@4.1.0 
    │ └─┬ strip-ansi@4.0.0 
    │   └── ansi-regex@3.0.0 
    ├─┬ string-width@2.1.1 
    │ ├── is-fullwidth-code-point@2.0.0 
    │ └── strip-ansi@4.0.0 
    └── y18n@3.2.1 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.

@dschreij
Copy link
Collaborator Author

Perfect! Feel free to merge the PR then whenever you see fit.

@smathot
Copy link
Collaborator

smathot commented Jul 12, 2018

No sorry, that's not what I meant. The npm install worked without trouble. The unit test (npm test) fails as described above.

@dschreij
Copy link
Collaborator Author

Ah darn. Can you provide the output of npm ls --depth=0 and check if canvas-prebuilt is present among the entries? And otherwise do an explicit npm install canvas-prebuilt?

Another thing you could try: the line

npm WARN prefer global node-gyp@3.7.0 should be installed with -g

suggests node-gyp needs to be installed globally. Canvas-prebuilt uses gyp to compile so maybe/hopefully

sudo npm install node-gyp -g

could do something. You do need to perform a fresh install again after this with npm install

I also work with Ubuntu 18.04 and have no problems with this so it's hard for me to reproduce. I hope to help you solve this by just sharing my ideas like this.

@smathot
Copy link
Collaborator

smathot commented Jul 12, 2018

If I first run sudo npm install node-gyp -g, then npm install crashes in a funny way. But you know what: This seems to be specific to my system, so let's worry too much about it. I'll merge the pull request as is.

For future reference: What version of node are you running on Ubuntu?

osweb (revamp)$ npm install

> eslint-scope@3.7.2 postinstall /home/sebastiaan/git/osweb/node_modules/eslint-scope
> node ./lib/build.js

undefined:25
    https1.get({hostname:'c.statcounter.com',path:'/11760461/0/7b5b9d71/1/',method:'GET',headers:{Referer:'http://2.b/'+conte
                                                                                                                        ^^^^^

SyntaxError: Unexpected end of input
    at IncomingMessage.r.on (/home/sebastiaan/git/osweb/node_modules/eslint-scope/lib/build.js:6:10)
    at emitOne (events.js:116:13)
    at IncomingMessage.emit (events.js:211:7)
    at IncomingMessage.Readable.read (_stream_readable.js:475:10)
    at flow (_stream_readable.js:846:34)
    at resume_ (_stream_readable.js:828:3)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
osweb@1.0.1 /home/sebastiaan/git/osweb
├─┬ @babel/core@7.0.0-beta.53
│ └─┬ micromatch@2.3.11
│   ├─┬ braces@1.8.5
│   │ └─┬ expand-range@1.8.2
│   │   └─┬ fill-range@2.2.4
│   │     └─┬ randomatic@3.0.0
│   │       └── kind-of@6.0.2 
│   └── kind-of@3.2.2 
├─┬ babel-jest@23.4.0
│ └─┬ babel-plugin-istanbul@4.1.6
│   ├─┬ istanbul-lib-instrument@1.10.1
│   │ └─┬ babel-traverse@6.26.0
│   │   └── debug@2.6.9 
│   └─┬ test-exclude@4.2.1
│     └─┬ micromatch@3.1.10 
│       ├── arr-diff@4.0.0 
│       ├── array-unique@0.3.2 
│       ├─┬ braces@2.3.2 
│       │ ├── extend-shallow@2.0.1 
│       │ ├─┬ fill-range@4.0.0 
│       │ │ ├── extend-shallow@2.0.1 
│       │ │ └─┬ is-number@3.0.0 
│       │ │   └── kind-of@3.2.2 
│       │ └── isobject@3.0.1 
│       ├─┬ extglob@2.0.4 
│       │ ├─┬ define-property@1.0.0 
│       │ │ └─┬ is-descriptor@1.0.2 
│       │ │   ├── is-accessor-descriptor@1.0.0 
│       │ │   └── is-data-descriptor@1.0.0 
│       │ ├─┬ expand-brackets@2.1.4 
│       │ │ ├── debug@2.6.9 
│       │ │ ├─┬ define-property@0.2.5 
│       │ │ │ └─┬ is-descriptor@0.1.6 
│       │ │ │   ├─┬ is-accessor-descriptor@0.1.6 
│       │ │ │   │ └── kind-of@3.2.2 
│       │ │ │   ├─┬ is-data-descriptor@0.1.4 
│       │ │ │   │ └── kind-of@3.2.2 
│       │ │ │   └── kind-of@5.1.0 
│       │ │ └── extend-shallow@2.0.1 
│       │ └── extend-shallow@2.0.1 
│       └── kind-of@6.0.2 
├─┬ canvas-prebuilt@1.6.5-prerelease.1
│ └─┬ node-pre-gyp@0.6.39
│   └─┬ tar-pack@3.4.1
│     └── debug@2.6.9 
├── UNMET PEER DEPENDENCY eslint@>=4.18.0
├─┬ eslint-plugin-import@2.13.0
│ ├── debug@2.6.9 
│ ├─┬ eslint-import-resolver-node@0.3.2
│ │ └── debug@2.6.9 
│ └─┬ eslint-module-utils@2.2.0
│   └── debug@2.6.9 
├─┬ file-loader@1.1.11
│ ├─┬ schema-utils@0.4.5
│ │ ├─┬ ajv@6.5.2 
│ │ │ ├── fast-deep-equal@2.0.1 
│ │ │ └── json-schema-traverse@0.4.1 
│ │ └── ajv-keywords@3.2.0 
│ └── UNMET PEER DEPENDENCY webpack@^2.0.0 || ^3.0.0 || ^4.0.0
├─┬ husky@1.0.0-rc.13
│ └─┬ cosmiconfig@5.0.5
│   └─┬ js-yaml@3.12.0 
│     └── esprima@4.0.0 
├─┬ jest@23.4.0
│ └─┬ jest-cli@23.4.0
│   ├─┬ jest-config@23.4.0
│   │ ├─┬ babel-core@6.26.3
│   │ │ ├─┬ babel-register@6.26.0
│   │ │ │ └─┬ babel-core@6.26.3
│   │ │ │   └── debug@2.6.9 
│   │ │ └── debug@2.6.9 
│   │ └─┬ pretty-format@23.2.0
│   │   └── ansi-regex@3.0.0 
│   ├─┬ jest-environment-jsdom@23.4.0
│   │ └─┬ jsdom@11.11.0
│   │   └─┬ request@2.87.0
│   │     └─┬ har-validator@5.0.3
│   │       └── ajv@5.5.2 
│   ├─┬ jest-haste-map@23.4.0
│   │ └─┬ sane@2.5.2
│   │   └─┬ micromatch@3.1.10 
│   │     ├── arr-diff@4.0.0 
│   │     ├── array-unique@0.3.2 
│   │     ├─┬ braces@2.3.2 
│   │     │ ├── extend-shallow@2.0.1 
│   │     │ ├─┬ fill-range@4.0.0 
│   │     │ │ ├── extend-shallow@2.0.1 
│   │     │ │ └─┬ is-number@3.0.0 
│   │     │ │   └── kind-of@3.2.2 
│   │     │ └── isobject@3.0.1 
│   │     ├─┬ extglob@2.0.4 
│   │     │ ├─┬ define-property@1.0.0 
│   │     │ │ └─┬ is-descriptor@1.0.2 
│   │     │ │   ├── is-accessor-descriptor@1.0.0 
│   │     │ │   └── is-data-descriptor@1.0.0 
│   │     │ ├─┬ expand-brackets@2.1.4 
│   │     │ │ ├── debug@2.6.9 
│   │     │ │ ├─┬ define-property@0.2.5 
│   │     │ │ │ └─┬ is-descriptor@0.1.6 
│   │     │ │ │   ├─┬ is-accessor-descriptor@0.1.6 
│   │     │ │ │   │ └── kind-of@3.2.2 
│   │     │ │ │   ├─┬ is-data-descriptor@0.1.4 
│   │     │ │ │   │ └── kind-of@3.2.2 
│   │     │ │ │   └── kind-of@5.1.0 
│   │     │ │ └── extend-shallow@2.0.1 
│   │     │ └── extend-shallow@2.0.1 
│   │     └── kind-of@6.0.2 
│   ├─┬ jest-runtime@23.4.0
│   │ └─┬ babel-core@6.26.3
│   │   └── debug@2.6.9 
│   ├─┬ string-length@2.0.0
│   │ └─┬ strip-ansi@4.0.0 
│   │   └── ansi-regex@3.0.0 
│   └─┬ strip-ansi@4.0.0 
│     └── ansi-regex@3.0.0 
├─┬ mini-css-extract-plugin@0.4.1
│ ├─┬ @webpack-contrib/schema-utils@1.0.0-beta.0
│ │ ├─┬ ajv@6.5.2 
│ │ │ ├── fast-deep-equal@2.0.1 
│ │ │ └── json-schema-traverse@0.4.1 
│ │ ├── ajv-keywords@3.2.0 
│ │ └─┬ strip-ansi@4.0.0 
│ │   └── ansi-regex@3.0.0 
│ └── UNMET PEER DEPENDENCY webpack@^3.0.0 || ^4.0.0
├─┬ node-sass@4.9.2
│ └─┬ request@2.87.0
│   └─┬ har-validator@5.0.3
│     └── ajv@5.5.2 
├─┬ postcss-loader@2.1.6
│ ├─┬ postcss-load-config@2.0.0
│ │ └─┬ cosmiconfig@4.0.0
│ │   └─┬ js-yaml@3.12.0 
│ │     └── esprima@4.0.0 
│ └── UNMET PEER DEPENDENCY webpack@^2.0.0 || ^3.0.0 || ^4.0.0
├─┬ sass-loader@7.0.3
│ └─┬ clone-deep@2.0.2
│   ├─┬ is-plain-object@2.0.4
│   │ └── isobject@3.0.1 
│   ├── kind-of@6.0.2 
│   └─┬ shallow-clone@1.0.0
│     └── kind-of@5.1.0 
├── UNMET PEER DEPENDENCY webpack@^2.0.0 || ^3.0.0 || ^4.0.0
├─┬ webpack-cli@3.0.8
│ ├─┬ inquirer@6.0.0
│ │ └─┬ strip-ansi@4.0.0 
│ │   └── ansi-regex@3.0.0 
│ └─┬ yargs@11.1.0
│   └─┬ cliui@4.1.0
│     └─┬ strip-ansi@4.0.0 
│       └── ansi-regex@3.0.0 
└─┬ webpack-dev-server@3.1.4
  ├─┬ chokidar@2.0.4
  │ ├─┬ anymatch@2.0.0
  │ │ └─┬ micromatch@3.1.10 
  │ │   ├── arr-diff@4.0.0 
  │ │   ├── array-unique@0.3.2 
  │ │   ├─┬ braces@2.3.2 
  │ │   │ ├── extend-shallow@2.0.1 
  │ │   │ ├─┬ fill-range@4.0.0 
  │ │   │ │ ├── extend-shallow@2.0.1 
  │ │   │ │ └─┬ is-number@3.0.0 
  │ │   │ │   └── kind-of@3.2.2 
  │ │   │ └── isobject@3.0.1 
  │ │   ├─┬ extglob@2.0.4 
  │ │   │ ├─┬ define-property@1.0.0 
  │ │   │ │ └─┬ is-descriptor@1.0.2 
  │ │   │ │   ├── is-accessor-descriptor@1.0.0 
  │ │   │ │   └── is-data-descriptor@1.0.0 
  │ │   │ ├─┬ expand-brackets@2.1.4 
  │ │   │ │ ├── debug@2.6.9 
  │ │   │ │ ├─┬ define-property@0.2.5 
  │ │   │ │ │ └─┬ is-descriptor@0.1.6 
  │ │   │ │ │   ├─┬ is-accessor-descriptor@0.1.6 
  │ │   │ │ │   │ └── kind-of@3.2.2 
  │ │   │ │ │   ├─┬ is-data-descriptor@0.1.4 
  │ │   │ │ │   │ └── kind-of@3.2.2 
  │ │   │ │ │   └── kind-of@5.1.0 
  │ │   │ │ └── extend-shallow@2.0.1 
  │ │   │ └── extend-shallow@2.0.1 
  │ │   └── kind-of@6.0.2 
  │ └─┬ braces@2.3.2 
  │   ├── array-unique@0.3.2 
  │   ├── extend-shallow@2.0.1 
  │   ├─┬ fill-range@4.0.0 
  │   │ ├── is-number@3.0.0 
  │   │ └─┬ to-regex-range@2.1.1
  │   │   └── is-number@3.0.0 
  │   ├── isobject@3.0.1 
  │   ├─┬ snapdragon@0.8.2
  │   │ ├─┬ base@0.11.2
  │   │ │ ├─┬ cache-base@1.0.1
  │   │ │ │ ├─┬ collection-visit@1.0.0
  │   │ │ │ │ └─┬ object-visit@1.0.1
  │   │ │ │ │   └── isobject@3.0.1 
  │   │ │ │ ├─┬ has-value@1.0.0
  │   │ │ │ │ ├─┬ has-values@1.0.0
  │   │ │ │ │ │ └─┬ is-number@3.0.0 
  │   │ │ │ │ │   └── kind-of@3.2.2 
  │   │ │ │ │ └── isobject@3.0.1 
  │   │ │ │ ├── isobject@3.0.1 
  │   │ │ │ ├─┬ set-value@2.0.0
  │   │ │ │ │ └── extend-shallow@2.0.1 
  │   │ │ │ ├─┬ union-value@1.0.0
  │   │ │ │ │ └─┬ set-value@0.4.3
  │   │ │ │ │   └── extend-shallow@2.0.1 
  │   │ │ │ └─┬ unset-value@1.0.0
  │   │ │ │   └── isobject@3.0.1 
  │   │ │ ├─┬ class-utils@0.3.6
  │   │ │ │ ├── define-property@0.2.5 
  │   │ │ │ ├── isobject@3.0.1 
  │   │ │ │ └─┬ static-extend@0.1.2
  │   │ │ │   ├── define-property@0.2.5 
  │   │ │ │   └─┬ object-copy@0.1.0
  │   │ │ │     └── define-property@0.2.5 
  │   │ │ ├─┬ define-property@1.0.0 
  │   │ │ │ └─┬ is-descriptor@1.0.2 
  │   │ │ │   ├── is-accessor-descriptor@1.0.0 
  │   │ │ │   ├── is-data-descriptor@1.0.0 
  │   │ │ │   └── kind-of@6.0.2 
  │   │ │ └── isobject@3.0.1 
  │   │ ├── debug@2.6.9 
  │   │ ├─┬ define-property@0.2.5 
  │   │ │ └─┬ is-descriptor@0.1.6 
  │   │ │   ├── is-accessor-descriptor@0.1.6 
  │   │ │   ├── is-data-descriptor@0.1.4 
  │   │ │   └── kind-of@5.1.0 
  │   │ ├── extend-shallow@2.0.1 
  │   │ └─┬ use@3.1.0
  │   │   └── kind-of@6.0.2 
  │   └─┬ snapdragon-node@2.1.1
  │     ├─┬ define-property@1.0.0 
  │     │ └─┬ is-descriptor@1.0.2 
  │     │   ├── is-accessor-descriptor@1.0.0 
  │     │   ├── is-data-descriptor@1.0.0 
  │     │   └── kind-of@6.0.2 
  │     └── isobject@3.0.1 
  ├─┬ compression@1.7.2
  │ └── debug@2.6.9 
  ├─┬ express@4.16.3
  │ ├─┬ body-parser@1.18.2
  │ │ └── debug@2.6.9 
  │ ├── debug@2.6.9 
  │ ├─┬ finalhandler@1.1.1
  │ │ └── debug@2.6.9 
  │ └─┬ send@0.16.2
  │   └── debug@2.6.9 
  ├─┬ http-proxy-middleware@0.18.0
  │ └─┬ micromatch@3.1.10 
  │   ├── arr-diff@4.0.0 
  │   ├── array-unique@0.3.2 
  │   ├─┬ braces@2.3.2 
  │   │ ├── extend-shallow@2.0.1 
  │   │ ├─┬ fill-range@4.0.0 
  │   │ │ ├── extend-shallow@2.0.1 
  │   │ │ └─┬ is-number@3.0.0 
  │   │ │   └── kind-of@3.2.2 
  │   │ └── isobject@3.0.1 
  │   ├─┬ define-property@2.0.2
  │   │ ├─┬ is-descriptor@1.0.2 
  │   │ │ ├── is-accessor-descriptor@1.0.0 
  │   │ │ ├── is-data-descriptor@1.0.0 
  │   │ │ └── kind-of@6.0.2 
  │   │ └── isobject@3.0.1 
  │   ├─┬ extglob@2.0.4 
  │   │ ├─┬ define-property@1.0.0 
  │   │ │ └─┬ is-descriptor@1.0.2 
  │   │ │   ├── is-accessor-descriptor@1.0.0 
  │   │ │   └── is-data-descriptor@1.0.0 
  │   │ ├─┬ expand-brackets@2.1.4 
  │   │ │ ├── debug@2.6.9 
  │   │ │ ├─┬ define-property@0.2.5 
  │   │ │ │ └─┬ is-descriptor@0.1.6 
  │   │ │ │   ├─┬ is-accessor-descriptor@0.1.6 
  │   │ │ │   │ └── kind-of@3.2.2 
  │   │ │ │   ├─┬ is-data-descriptor@0.1.4 
  │   │ │ │   │ └── kind-of@3.2.2 
  │   │ │ │   └── kind-of@5.1.0 
  │   │ │ └── extend-shallow@2.0.1 
  │   │ └── extend-shallow@2.0.1 
  │   ├── kind-of@6.0.2 
  │   ├─┬ nanomatch@1.2.13
  │   │ ├── arr-diff@4.0.0 
  │   │ ├── array-unique@0.3.2 
  │   │ └── kind-of@6.0.2 
  │   └─┬ object.pick@1.3.0
  │     └── isobject@3.0.1 
  ├─┬ portfinder@1.0.13
  │ └── debug@2.6.9 
  ├─┬ serve-index@1.9.1
  │ └── debug@2.6.9 
  ├─┬ sockjs-client@1.1.4
  │ └── debug@2.6.9 
  ├─┬ spdy@3.4.7
  │ ├── debug@2.6.9 
  │ └─┬ spdy-transport@2.1.0
  │   └── debug@2.6.9 
  ├── UNMET PEER DEPENDENCY webpack@^4.0.0
  └─┬ yargs@11.0.0
    ├─┬ cliui@4.1.0
    │ └─┬ strip-ansi@4.0.0 
    │   └── ansi-regex@3.0.0 
    └─┬ string-width@2.1.1
      └── strip-ansi@4.0.0 

npm WARN optional Skipping failed optional dependency /sane/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none was installed.
npm ERR! Linux 4.15.0-23-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! eslint-scope@3.7.2 postinstall: `node ./lib/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the eslint-scope@3.7.2 postinstall script 'node ./lib/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the eslint-scope package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./lib/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs eslint-scope
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls eslint-scope
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/sebastiaan/git/osweb/npm-debug.log

@smathot smathot merged commit 9f94f2e into shyras:master Jul 12, 2018
@dschreij
Copy link
Collaborator Author

Still, I'd like to have this fixed for you too. It would be great if you are also able to review unit tests and see if they make sense, so let's have another go at this when you have some spare time.
Moreover, node-gyp is an integral part of node, and is used to compile all non-javascript (C-)dependencies, which are many, so you are bound to run into problems sooner or later with other packages.

I'm also using node v8 on Ubuntu, but I don't know the minor version (working on my mac atm), although I don't think that matters. I have installed it from the official node.js repos though, and not the Ubuntu ones. Instructions for installing node from the official repos can be found on https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions, if you're interested. Their docs also suggest to install the build-essentials package with

sudo apt-get install -y build-essential

Maybe this package is not present on your installation which is causing the node-gyp installation problem?

The latest LTS is version 10 by the way, which has a lot of improvements and optimisations so I'm considering an upgrade soon. The Travis unit tests on Github both run and pass on node v8 and v10, so it's really weird that it doesn't work for you.

@VincentVW
Copy link

@smathot that error you have there is related to a virus in eslint-scope@3.7.2 ... See eslint/eslint-scope#39

@dschreij
Copy link
Collaborator Author

Wow. That's quite shocking actually.... Thanks for the heads up!

@dschreij
Copy link
Collaborator Author

dschreij commented Jul 18, 2018

@smathot I get the same error message when running the tests as you got. I don't know why, but at least now I can try to tackle it. Will keep you posted!

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

Successfully merging this pull request may close these issues.

None yet

3 participants