kaluginserg / cytoscape-node-html-label

Labels for cytoscape node. Demo:
https://kaluginserg.github.io/cytoscape-node-html-label/
MIT License
100 stars 42 forks source link

npm run test results in an error "ReferenceError: primordials is not defined" #47

Closed rwaldron closed 3 years ago

rwaldron commented 4 years ago
$ npm run test

> cytoscape-node-html-label@1.2.0 test /Users/rwaldron/clonez/cytoscape-node-html-label
> gulp test

fs.js:35
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:35:5
    at req_ (/Users/rwaldron/clonez/cytoscape-node-html-label/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/rwaldron/clonez/cytoscape-node-html-label/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/rwaldron/clonez/cytoscape-node-html-label/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cytoscape-node-html-label@1.2.0 test: `gulp test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cytoscape-node-html-label@1.2.0 test 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/rwaldron/.npm/_logs/2020-07-06T16_43_49_290Z-debug.log
josejulio commented 4 years ago

Strange, that doesn't happen to me:

$ yarn test
yarn run v1.16.0
$ gulp test
[12:13:56] Using gulpfile ~/Documentos/opensource/cytoscape-node-html-label/gulpfile.js
[12:13:56] Starting 'test'...
06 07 2020 12:13:56.929:WARN [karma]: No captured browser, open http://localhost:9876/
06 07 2020 12:13:56.936:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
06 07 2020 12:13:56.937:INFO [launcher]: Launching browsers Chrome, PhantomJS with unlimited concurrency
06 07 2020 12:13:56.947:INFO [launcher]: Starting browser Chrome
06 07 2020 12:13:56.955:INFO [launcher]: Starting browser PhantomJS
06 07 2020 12:13:57.296:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket yA_zQxlTgbKuB7pJAAAA with id 93301294
06 07 2020 12:13:57.731:INFO [Chrome 73.0.3683 (Linux 0.0.0)]: Connected on socket -u4HfWDHIz3cnzgGAAAB with id 88532972
Chrome 73.0.3683 (Linux 0.0.0): Executed 4 of 4 SUCCESS (0.081 secs / 0.031 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 4 of 4 SUCCESS (0.044 secs / 0.018 secs)
TOTAL: 8 SUCCESS

Did you npm install before running the tests? (sorry if too obvious, but sometimes these things happen).

josejulio commented 4 years ago

I also see that the natives package (where the error happens) has been deprecated.

https://www.npmjs.com/package/natives

josejulio commented 3 years ago

This should be fixed by https://github.com/kaluginserg/cytoscape-node-html-label/commit/a71d8c9c216739873d52cec1a9d39f0408d3347b, I bumped the gulp version.