小编Sap*_*ngh的帖子

Gatsby-无法解析“C:\Users\...\gatsby-starter-hello-world\node_modules\postcss\lib”中的“路径”

我正在尝试将sanitize-html包与@types/sanitize-html打字稿一起使用,但它会导致以下错误-

ERROR in ./node_modules/postcss/lib/input.js 4:30-45
Module not found: Error: Can't resolve 'path' in 'C:\Users\sapin\Desktop\gatsby-starter-hello-world\node_modules\postcss\lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
        - install 'path-browserify'
If you don't want to include a …
Run Code Online (Sandbox Code Playgroud)

path node.js node-modules gatsby

3
推荐指数
1
解决办法
819
查看次数

标签 统计

gatsby ×1

node-modules ×1

node.js ×1

path ×1