问题
I downloaded below angular project and followed their instruction to install.
https://snipcart.com/blog/angular-seo-universal-server-side-rendering
npm install
... works fine.
ng serve
.... works fine
npm run build:ssr
&& npm run serve:ssr
... this giving an error.
(node:5644) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
I am using node version v10.1.0
on localhost, it is running though having DeprecationWarning. But the server.js inside dist folder no way running after showing the same error.
Can anyone suggest why I am getting this error and what is the solution?
回答1:
welcome to Stack Overflow.
I came across this github issues about yarn and they talk about the issue (also discuss about Node) and it seems it's something that is fixed but is just waiting for the update. Therefore it seems you have to wait it out and then be sure to update? Perhaps try an update with Node now and see if that will fix it but they seem to have fixed and committed the goodness but it's now a waiting game.
*edit can I ask is the app running? It looks like it from your uploaded photo. I'll update you if I find anything else but i'd follow the issue form that Repo and see if anything new comes up.
Hope that helps!
来源:https://stackoverflow.com/questions/51960591/deprecationwarning-buffer-is-deprecated-due-to-security-and-usability-issues