尝试构建服务器端渲染角度 9 时出错

时间:2021-03-26 08:15:30

标签: javascript node.js typescript angular9

我在使用 paper 0.12.0 时遇到了同样的错误和更多错误。在构建用于服务器渲染的分发工具包的构建部分时,不会生成服务器文件夹。 我运行的命令:

ng add @ nguniversal / express-engine
npm run build: ssr && npm run serve: ssr

#Exceptions 和警告:

WARNING in ./node_modules/paper/dist/node/extend.js 29:8-15
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./node_modules/paper/dist/node/extend.js 48:32-39
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ./node_modules/paper/dist/node/canvas.js
Module not found: Error: Can't resolve 'canvas' in '/home/ubuntudev/workspace/dev/repos/client/btxclient/node_modules/paper/dist/node'

ERROR in ./node_modules/jsdom/lib/jsdom/utils.js
Module not found: Error: Can't resolve 'canvas' in '/home/ubuntudev/workspace/dev/repos/client/btxclient/node_modules/jsdom/lib/jsdom'
``

0 个答案:

没有答案
相关问题