我从git克隆了github的Chart.js,然后npx gulp build
失败了。错误消息为“ sourcemap
不是受支持的选项”。
我正在使用节点v10.16.2和npm 6.9.0。
我做到了
git clone https://github.com/chartjs/Chart.js.git
cd Chart.js
npm install
npx gulp build
我知道了
% npx gulp build
[11:19:05] Using gulpfile ~/tmp/chartjs-debug/Chart.js/gulpfile.js
[11:19:05] Starting 'build'...
src/index.js → dist/Chart.js...
created dist/Chart.js in 1.3s
src/index.js → dist/Chart.min.js...
`sourcemap` is not a supported option
[!] (terser plugin) Error: `sourcemap` is not a supported option
DefaultsError: `sourcemap` is not a supported option
at a.get (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/rollup-plugin-terser/node_modules/terser/dist/bundle.min.js:1:463)
at reportError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:75:11)
at execMethod (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:93:5)
at process.on (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/jest-worker/build/child.js:40:7)
at process.emit (events.js:198:13)
at emit (internal/child_process.js:832:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[11:19:07] 'build' errored after 2.72 s
[11:19:07] Error: 1
at formatError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
at Gulp.<anonymous> (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
at Gulp.emit (events.js:203:15)
at Gulp.EventEmitter.emit (domain.js:448:20)
at Object.error (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
at handler (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/now-and-later/lib/map.js:50:14)
at f (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/once/once.js:25:25)
at f (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/once/once.js:25:25)
at tryCatch (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:24:15)
at done (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:40:12)
at onError (/home/ubuntu/tmp/chartjs-debug/Chart.js/node_modules/async-done/index.js:51:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
%
有什么主意吗?谢谢!