私のプロジェクトでビジュアルスタジオでgulpを使用しています。2013年ガルプのエラー - 'パスが指定されていません!親戚を得ることはできません。
すべてのプロジェクトを新しいdev-machineに移動しました。私はgulpを使用しています。ここgulpfile.jsの私の仕事は、次のとおりです。
config = {
scripts: {
src: "./app",
destination: "./scripts/app"
},
templates: {
src: "./app/**/*.tmpl.html",
destination: "./scripts/app",
filename: "templates"
},
build: {
src: "./scripts/app/*.js",
destination: "./scripts/build",
filename: "dashboard-build"
}
}
gulp.task("templates", function() {
gulp.src(config.templates.src)
.pipe(html2js({
outputModuleName: "templates",
useStrict: true
}))
.pipe(concat(config.templates.filename + ".js"))
.pipe(gulp.dest(config.templates.destination))
});
私はこのエラーを取得タスクコマンドプロンプトウィンドウを起動してみてください。私の古いマシン上のすべてが完璧に働いている間
C:\Development\Repositories\Tambaound\Tambaound.Web>gulp templates
[17:04:59] Using gulpfile C:\Development\Repositories\Tambaound\Tambaound.Web\gulpfile.js
[17:04:59] Starting 'templates'...
[17:04:59] Finished 'templates' after 12 ms
C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\gulp-util\node_modules\vinyl\index.js:120
if (!this.path) throw new Error('No path specified! Can not get relative.');
^
Error: No path specified! Can not get relative.
at File.get (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\gulp-util\node_modules\vinyl\index.js:120:27)
at Stream.bufferContents (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-concat\index.js:35:20)
at Stream.stream.write (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-concat\node_modules\through\index.js:26:11)
at DestroyableTransform.ondata (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:531:20)
at emitOne (events.js:96:13)
at DestroyableTransform.emit (events.js:188:7)
at readableAddChunk (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:198:18)
at DestroyableTransform.Readable.push (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:157:10)
at DestroyableTransform.Transform.push (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:123:32)
at DestroyableTransform._flush (C:\Development\Repositories\Tambaound\Tambaound.Web\node_modules\gulp-html2js\index.js:75:14)
および他のすべてのタスクを新しいdevマシンでうまく動作します。
問題の解決方法を教えてください。