0

我想使用带有 Yarn PnP 的 Gulp 和 ES6modules,但是带有 ES6modules 的 Gulp 不支持 PnP ...

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'gulp' imported from /<pathToProject>/gulpfile.js
Did you mean to import gulp-npm-4.0.2-57826bdf31-c18e6c33e6.zip/node_modules/gulp/index.js?
    at new NodeError (node:internal/errors:371:5)
    at packageResolve (node:internal/modules/esm/resolve:864:9)
    at moduleResolve (node:internal/modules/esm/resolve:910:18)
    at defaultResolve (node:internal/modules/esm/resolve:1005:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:475:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:245:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
    at link (node:internal/modules/esm/module_job:78:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

如果nodeLinker: "node-modules".yarnrc.ymlPnP 中设置将停止工作...

我可以以某种方式指定需要与 PnP 并行保存在 node_modules 中的依赖项吗?

谢谢^_^

4

0 回答 0