sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 514 forks source link

npm run build errors #411

Open ray73864 opened 3 years ago

ray73864 commented 3 years ago

Cloned the git repo, did the usual 'npm i' on it.

When I went to do 'npm run build' it returned some errors.

At first it returned an error about 'rollup' missing, so I 'npm i -g rollup', then it got further and threw up an error on 'rollup-plugin-node-resolve', so I did 'npm i -g rollup-plugin-node-resolve'.

Every attempt of running 'npm run build' after that kept failing at 'rollup-plugin-node-resolve', so I switched over to installing 'rollup' and 'rollup-plugin-node-resolve' locally instead by doing 'npm i rollup' and 'npm i rollup-plugin-node-resolve'.

Then I got further, this time, I got stuck on 'rollup-plugin-svelte', and then 'rollup-plugin-babel' and 'rollup-plugin-postcss'.

It seems every time I fix one rollup-plugin, another one just rears itself.

Everytime I install one of these additional things, NPM tells me 'This package has been deprecated and is no longer maintained. Please use @rollup/plugin-...'.

Since this has such a reliance on rollup and its plugins, possibly amend the package.json so that when a person freshly clones the git repo and runs 'npm i', it downloads everything required, and not just assume the person may have it installed?

I don't use node all that much, it's not something I have any need for in my day to day work, I just wanted a fresh version of pnotify that I could customise where necessary.

ray73864 commented 3 years ago

So far, I have needed to add the following plugins for rollup:

rollup-plugin-node-resolve
rollup-plugin-svelte
rollup-plugin-babel
rollup-plugin-postcss
rollup-plugin-terser

I have also had to install the following additional things:

@babel/preset-env

Once I added all those locally (globally didn't work), it was able to successfully build pnotify for me.

ray73864 commented 3 years ago

Forgot to add versions:

Node v12.16.1 npm v7.6.0