【发布时间】:2019-04-14 11:10:25
【问题描述】:
我有一个gulp 文件夹,里面有这个gulpfile.js
const source = require('vinyl-source-stream');
const gulp = require('gulp');
module.exports = function(args) {
gulp.task('default', function() {});
}
我有一个带有gulpfile.js 的project 文件夹
const projectGulp = require('../gulp/gulpfile.js')
projectGulp();
在project 文件夹中,我有一个package.json 并添加了vinyl-source-stream 作为开发依赖项,现在我在此文件夹上运行yarn install。
当我运行gulp 时,我得到Cannot find module vinyl-source-stream 错误。
如果我对 gulp 文件夹执行操作并执行 yarn install vinyl-source-stream 它工作正常。现在我收到Task default is not in your gulpfile 错误。
【问题讨论】:
-
你的
NODE_ENV值是多少? -
我没有那个。
-
试试
yarn install --production=false -
不,它不起作用
标签: javascript node.js gulp babeljs