Gulp - Visual Studio 2017 - MSB3073 命令“gulp postbuild”以1的代码退出。

3
在 Visual Studio 2017 中,我遇到了错误 MSB3073 The command "gulp postbuild" exited with code 1
我的 gulp 文件中包含以下内容:
gulp.task('postbuild', function() {
   //...
});

在命令行中,当我尝试执行gulp loc时,出现错误:
C:\Users\User\AppData\Roaming\npm\node_modules\gulp\node_modules\semver\semver.js:281
throw new TypeError('Invalid Version: ' + version);
^

TypeError: Invalid Version: undefinedypeError('Invalid Version: ' + version);
1个回答

1
在我的情况下,我只需要添加一个环境变量NODE_PATH,指向%AppData%\npm\node_modules

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接