我遇到以下错误:
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module '/private/var/tmp/_bazel_user/1278b7bdb66d5638f4b8805b0e51d711/external/npm/scripts/vendor-patches.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
error Command failed with exit code 1.
在WORKSPACE文件中,我具有以下配置:
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
package.json具有以下内容:
"postinstall": "node ./scripts/vendor-patches.js"
如何在运行yarn_install步骤之前将脚本复制到bazel工作区?