gpt4 book ai didi

gulp watch 抛出错误 Error : watch

转载 作者:行者123 更新时间:2023-12-05 07:34:22 27 4
gpt4 key购买 nike

最近我在 gulp watch 上遇到错误,我用谷歌搜索并试图解决这个问题,但没有成功。有谁知 Prop 体原因吗?

应用程序基于 AngulerJs 1.3 并运行在 npm 5.7.1/node v6.9.5 Ubuntu 16.04 上

我几个月前遇到了同样的问题,当时努力解决它,然后问题自行消失,或者至少我不知道如何解决。

错误输出:

Error: watch /home/demo/project/web/admin/src/css ENOSPC
at exports._errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1429:19)
at Object.fs.watch (fs.js:1456:11)
at createFsWatchInstance
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:229:14)
at FSWatcher.NodeFsHandler._handleDir
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:408:19)
at FSWatcher.<anonymous>
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:456:19)
at FSWatcher.<anonymous>
(/home/demo/project/web/admin/node_modules/chokidar/lib/nodefs-handler.js:461:16)
at FSReqWrap.oncomplete (fs.js:123:15)

Gulpfile.js

var gulp = require('gulp');
var Gulp = require('gulp');
var Less = require('gulp-less');
var Path = require('path');
var JShint = require('gulp-jshint');
var Browserify = require('browserify');
var Sourcemaps = require('gulp-sourcemaps');
var Source = require('vinyl-source-stream');
var htmlmin = require('gulp-htmlmin');
var RunSequence = require('run-sequence');
var watch = require('gulp-watch');

Gulp.task('css', function () {
return watch('./src/css/*.css', function () {
Gulp.src('./src/css/*.css')
.pipe(Gulp.dest('./public/css'));
});
});

Gulp.task('default', ['css'], function () {});

包.json

{
"name": "project",
"version": "1.0.0",
"description": " Administration Tool",
"main": "index.js",
"devDependencies": {
"browserify": "^7.0.1",
"browserify-ngannotate": "^0.4.0",
"browserify-shim": "^3.8.1",
"deamdify": "^0.1.1",
"gulp": "^3.9.1",
"gulp-jshint": "^2.1.0",
"gulp-less": "^3.5.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-htmlmin": "^4.0.0",
"gulp-watch": "^5.0.0",
"jshint": "^2.9.5",
"run-sequence": "^1.0.2",
"vinyl-source-stream": "^1.0.0"
},
"browser": {
"angular": "./src/vendor/angular/angular.js",
"angular-animate": "./src/vendor/angular-animate/angular-animate.js",
"angular-bootstrap": "./src/vendor/angular-bootstrap/ui-bootstrap-tpls.js",
"angular-cookies": "./src/vendor/angular-cookies/angular-cookies.js",
"angular-resource": "./src/vendor/angular-resource/angular-resource.js",
"angular-sanitize": "./src/vendor/angular-sanitize/angular-sanitize.js",
"angular-storage": "./src/vendor/ngstorage/ngStorage.js",
"angular-touch": "./src/vendor/angular-touch/angular-touch.js",
"angular-translate": "./src/vendor/angular-translate/angular-translate.js",
"angular-ui-router": "./src/vendor/angular-ui-router/release/angular-ui-router.js",
"angular-ui-utils": "./src/vendor/angular-ui-utils/ui-utils.js",
"angular-ui-select": "./src/vendor/angular-ui-select/dist/select.js",
"angular-gravatar": "./src/vendor/angular-gravatar/build/angular-gravatar.js",
"angular-toaster": "./src/vendor/angularjs-toaster/toaster.js",
"angular-breadcrumb": "./src/vendor/angular-breadcrumb/dist/angular-breadcrumb.js",
"md5": "./src/vendor/angular-gravatar/build/md5.js",
"ocLazyLoad": "./src/vendor/oclazyload/dist/ocLazyLoad.js",
"jquery": "./src/vendor/jquery/dist/jquery.js",
"http-auth-interceptor": "./src/vendor/angular-http-auth/src/http-auth-interceptor.js",
"moment": "./src/vendor/moment/moment.js",
"lunr": "./src/vendor/lunr.js/lunr.js",
"linq": "./src/vendor/linqjs-amd/linq.js"
},
"browserify-shim": {
"jquery": "$",
"angular": {
"depends": "jquery:jQuery",
"exports": "angular"
},
"angular-animate": {
"depends": "angular",
"exports": "angular.module('ngAnimate').name"
},
"angular-bootstrap": {
"depends": "angular",
"exports": "angular.module('ui.bootstrap').name"
},
"angular-cookies": {
"depends": "angular",
"exports": "angular.module('ngCookies').name"
},
"angular-resource": {
"depends": "angular",
"exports": "angular.module('ngResource').name"
},
"angular-sanitize": {
"depends": "angular",
"exports": "angular.module('ngSanitize').name"
},
"angular-storage": {
"depends": "angular",
"exports": "angular.module('ngStorage').name"
},
"angular-touch": {
"depends": "angular",
"exports": "angular.module('ngTouch').name"
},
"angular-translate": {
"depends": "angular",
"exports": "angular.module('pascalprecht.translate').name"
},
"angular-ui-router": {
"depends": "angular",
"exports": "angular.module('ui.router').name"
},
"angular-ui-utils": {
"depends": "angular",
"exports": "angular.module('ui.utils').name"
},
"angular-ui-select": {
"depends": "angular",
"exports": "angular.module('ui.select').name"
},
"md5": {
"depends": "angular",
"exports": "angular.module('md5').name"
},
"angular-gravatar": {
"depends": [
"angular"
],
"exports": "angular.module('ui.gravatar').name"
},
"angular-toaster": {
"depends": [
"angular",
"angular-animate"
],
"exports": "angular.module('toaster').name"
},
"angular-breadcrumb": {
"depends": [
"angular"
],
"exports": "angular.module('ncy-angular-breadcrumb').name"
},
"http-auth-interceptor": {
"depends": "angular",
"exports": "angular.module('http-auth-interceptor').name"
},
"ocLazyLoad": {
"depends": "jquery:jQuery"
},
"moment": {
"exports": "moment"
},
"lunr": {
"exports": "lunr"
}
},
"browserify": {
"transform": [
"browserify-shim"
]
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {}
}

最佳答案

系统中可以观看的文件数量是有限制的。我们必须增加这个数字。下面的命令可以用来增加这个数字。

这个解决方案对我有用。

echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

来源:Gulp Error: watch ENOSPC

关于gulp watch 抛出错误 Error : watch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50151071/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com