gulp-component
gulp-component copied to clipboard
Failed to lookup dependency
gulpfile.coffee
gulp.task "component", ->
gulp.src "./component.json"
.pipe $.component.scripts
standalone: true
.pipe gulp.dest Config.dist + "/components"
component.json
{
"name" : "myproject",
"dependencies": {
"tuxlinuxien/kiwi": "*"
},
"styles": [
"index.css"
],
"scripts": [
"index.js"
]
}
Running component build
works fine but gulp component
throws an error: "Failed to lookup 'myproject's dependency 'tuxlinuxien-kiwi'. I get the same error no matter what components I put as dependencies. I tried upgrading component
to the latest version, as well as upgrading node_modules/gulp-connect/node_modules/component-builder
from 0.1.0 to 1.1.2. Now I get a different error:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
TypeError: object is not a function
at /Users/me/Desktop/project/node_modules/gulp-component/index.js:75:23
I meet same error, but in events.js:72
events.js:72
throw er; // Unhandled 'error' event
^
Error: failed to lookup "jsonpipe"'s dependency "yyx990803-vue"
my gulp-component version is 0.1.5 and component file below
{
"name": "demo",
"version": "0.0.0",
"dependencies": {
"yyx990803/vue": "~0.11.5"
},
"main": "src/main.js",
"scripts": [
"src/main.js"
]
gulpfile as yeoman generater default
gulp.task('default', ['lint'], function () {
return gulp.src('component.json')
.pipe(component({
standalone: true
}))
.pipe(gulp.dest('build'))
})