reveal.js
reveal.js copied to clipboard
Build fails
Hi,
after cloning repo and npm install when I run npm run build I get circular dependency errors like
Circular dependency: node_modules\core-js\modules\es.string.ends-with.js -> node_modules\core-js\modules\es.string.ends-with.js Circular dependency: node_modules\core-js\modules\es.string.starts-with.js -> node_modules\core-js\modules\es.string.starts-with.js Circular dependency: node_modules\core-js\modules\es.string.trim.js -> node_modules\core-js\modules\es.string.trim.js Circular dependency: node_modules\core-js\modules\es.string.trim-end.js -> node_modules\core-js\modules\es.string.trim-end.js
and build fails.
What should I do?
#2841
I'm on node v12.19.0, and getting this issue (testing with the reveal.js v4.1.0 release), so I'm not sure it's the same issue as that @coMnaxtikgi - any updates here?
- node: tested and happens on both v12.19.0 and v14.15.2
- npm: v6.14.9
- OS: Windows 10, v1909
This feels like a Windows 10 issue - I do not get the errors when running in the Ubuntu Windows Subsystem for Linux (WSL).
Still occuring on node-lts v16.13.0, Win10, 20H2 build 19042.1348
Still having this on Windows 10/11 on several node versions (tested on 16, 15, 14). It seems like this is caused by the plugin task in the build pipeline, more precisely the babel(...) pipe seems to be broken in combination with the RevealNotes plugin.
For anyone with the same problem. I got it fixed by changing the Gulpfile https://github.com/hakimel/reveal.js/blob/61055ed02bd7dbff30ea827591084cce7c22303c/gulpfile.js#L137-L141 to
babel({
...babelConfig,
+ exclude: [/core-js/],
ignore: [/node_modules\/(?!(highlight\.js|marked)\/).*/],
}),
terser()
For anyone with the same problem. I got it fixed by changing the Gulpfile
https://github.com/hakimel/reveal.js/blob/61055ed02bd7dbff30ea827591084cce7c22303c/gulpfile.js#L137-L141
to
babel({ ...babelConfig, + exclude: [/core-js/], ignore: [/node_modules\/(?!(highlight\.js|marked)\/).*/], }), terser()
Thanks! I was struggling to install reveal.js for an hour. This fix removed the freeze from the installation process.