我正在从gulp运行webpack。我面临的问题是,gulp更改了webpack在其中搜索节点模块的目录。
这是我的大口饭代码:
gulp.task("scripts", callback => {
webpack(require("../../webpack.config.js"), (err, stats) => {
if (err) {
console.log(err.toString());
}
console.log(stats.toString());
callback();
});
});
运行此命令时,出现以下错误:
ENOENT: no such file or directory, open 'D:\@Udemy Courses\Git A Web Developer Job\course\D:\@Udemy Courses\Git A Web Developer Job\course\node_modules\babel-loader\lib\index.js'
Error: ENOENT: no such file or directory, open 'D:\@Udemy Courses\Git A Web Developer Job\course\D:\@Udemy Courses\Git A Web Developer Job\course\node_modules\babel-loader\lib\index.js'
Error loading D:/@Udemy Courses/Git A Web Developer Job/course/D:\@Udemy Courses\Git A Web Developer Job\course\node_modules\babel-loader\lib\index.j
您会在错误代码中看到,它重复了两次目录。我该如何解决?