PacktPublishing / Expert-Data-Visualization

Code Repository for Expert Data Visualization by Packt
MIT License
6 stars 7 forks source link

dataviz-d3js@1.0.0 start script failed #1

Open MortalCatalyst opened 4 years ago

MortalCatalyst commented 4 years ago

Tried on windows 10 and ubuntu wsl 18.04.4 bionic Node: 12.16.1 npm: 6.14.4

gulp version

sayth@DESKTOP-P6MMLHV:/c/Users/sayth/projects/Learn_D3/d3dv$ gulp --version
CLI version: 2.2.0
Local version: 4.0.2

I receive this error and am unable to start the webserver with npm start and cannot resolve.

sayth@DESKTOP-P6MMLHV:/c/Users/sayth/projects/Learn_D3/d3dv$ npm start

> dataviz-d3js@1.0.0 start /c/Users/sayth/projects/Learn_D3/d3dv
> gulp

assert.js:385
    throw err;
    ^

AssertionError [ERR_ASSERTION]: Task function must be specified
    at Gulp.set [as _setTask] (/c/Users/sayth/projects/Learn_D3/d3dv/node_modules/undertaker/lib/set-task.js:10:3)
    at Gulp.task (/c/Users/sayth/projects/Learn_D3/d3dv/node_modules/undertaker/lib/task.js:13:8)
    at Object.<anonymous> (/c/Users/sayth/projects/Learn_D3/d3dv/gulpfile.js:28:6)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at execute (/c/Users/sayth/projects/Learn_D3/d3dv/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:36:18) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dataviz-d3js@1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dataviz-d3js@1.0.0 start 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!     /home/sayth/.npm/_logs/2020-04-24T13_28_49_218Z-debug.log
sayth@DESKTOP-P6MMLHV:/c/Users/sayth/projects/Learn_D3/d3dv$
josdirksen commented 1 year ago

Gulp is kinda old and this repo hasnt been updated for a while. For easier way to start this just go to the source directory and use something like this:

$ python3 -m http.server

or

$ npx http-server