我下载了以下 Angular 项目,并按照他们的指示进行了安装。
https://snipcart.com/blog/angular-seo-universal-server-side-rendering
npm install
... 运行正常。
ng serve
.... 运行正常。
npm run build:ssr
&& npm run serve:ssr
... 出现错误。
(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.
我正在使用Node版本v10.1.0
在本地主机上,虽然出现了DeprecationWarning警告,但它仍在运行。但是,在dist文件夹中的server.js显示相同错误后,无法运行。
有人能建议我为什么会出现这个错误以及解决方法吗?