DeprecationWarning: Buffer() is deprecated due to security and usability issues

北战南征 提交于 2020-01-03 15:54:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!