Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp error in develop branch #3

Closed
CraryPrimitiveMan opened this issue Nov 8, 2015 · 6 comments
Closed

Gulp error in develop branch #3

CraryPrimitiveMan opened this issue Nov 8, 2015 · 6 comments

Comments

@CraryPrimitiveMan
Copy link
Owner

@vincenthou
[19:55:08] Failed to load external module babel-core/register
[19:55:08] Requiring external module babel/register
[19:55:14] Using gulpfile /var/www/phpMongoAdmin/app/gulpfile.babel.js
[19:55:14] Starting 'connect'...
[19:55:14] Finished 'connect' after 76 ms
[19:55:14] Starting 'watch'...
[19:55:14] Starting 'copy'...
[19:55:14] Starting 'copyFonts'...
[19:55:14] Starting 'less'...
[19:55:14] Server started http://localhost:8001
[19:55:14] LiveReload started on port 35729
[19:55:14] Finished 'copy' after 192 ms
[19:55:14] Finished 'less' after 200 ms
[19:55:15] Finished 'copyFonts' after 911 ms
events.js:85
throw er; // Unhandled 'error' event
^
Error: watch ENOSPC
at exports._errnoException (util.js:746:11)
at FSWatcher.start (fs.js:1172:11)
at Object.fs.watch (fs.js:1198:11)
at createFsWatchInstance (/var/www/phpMongoAdmin/app/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/var/www/phpMongoAdmin/app/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at EventEmitter.NodeFsHandler._watchWithNodeFs (/var/www/phpMongoAdmin/app/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at EventEmitter.NodeFsHandler._handleFile (/var/www/phpMongoAdmin/app/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at EventEmitter. (/var/www/phpMongoAdmin/app/node_modules/watchify/node_modules/chokidar/lib/nodefs-handler.js:468:21)
at FSReqWrap.oncomplete (fs.js:95:15)

@vincenthou
Copy link
Collaborator

It is a common issue for linux environment for watch task, we all have faced with before. Linux has limitation for watched files by default, you should reset the configuration

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

Suggestion: A better issue should looks like the sample, you need to tell others your reproduce steps, environment and your trying for it, better not just paste error messages. This will help to find the root cause and save our time 😄

Note: For the first line warning, please provide your local gulp version, mine is shown below:

$ gulp -v
[21:48:19] Requiring external module babel/register
[21:48:19] CLI version 3.9.0
[21:48:19] Local version 3.9.0

As I can not reproduce the case, please help to run the command, if it helps, I will add it to dependencies.

npm install babel-core --save-dev

@vincenthou
Copy link
Collaborator

It seems that the warning is not a big issue, It become an optional choice now, you can refer the resource here:

@CraryPrimitiveMan
Copy link
Owner Author

@vincenthou

[21:41:47] Requiring external module babel-core/register
/var/www/phpMongoAdmin/app/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import gulp from
^^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at loader (/var/www/phpMongoAdmin/app/node_modules/babel-core/lib/api/register/node.js:136:5)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff. (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:192:16)

@CraryPrimitiveMan
Copy link
Owner Author

jun@jun-Ubuntu:/var/www/phpMongoAdmin/app$ gulp --version
[21:46:01] Requiring external module babel-core/register
[21:46:01] CLI version 3.9.0
[21:46:01] Local version 3.9.0
jun@jun-Ubuntu:/var/www/phpMongoAdmin/app$ node --version
v0.12.7

@vincenthou
Copy link
Collaborator

@CraryPrimitiveMan change the line in package.json to

"babel-core": "5.6.1",

Remove node_modules folder and install again

npm install
gulp

I can not reproduce the case, please tell me the result

@CraryPrimitiveMan
Copy link
Owner Author

I got an exception.
Uncaught SyntaxError: Unexpected token => report.js:134

I think you should update README.md to tell others how to run the program.
@vincenthou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants