Nodejs
gerrylon007
这个作者很懒,什么都没留下…
展开
-
node进程管理器之pm2
pm2是nodejs的进程管理器. 官网地址安装此处为使用cnpm全局安装cnpm i pm2 -g基本使用注意, 这里都是在项目根目录下运行的在使用pm2之前, 一个koa2的hello world运行是这样的:node koa-demo.js用了pm2, 可以这样:pm2 start koa-demo.js还可以在项目根目录下创建一个...原创 2018-03-09 16:42:29 · 1439 阅读 · 0 评论 -
ERROR in Node Sass does not yet support your current environmen
node-sass版本( v >= 3.13.0 && v < 4.0.0) “node-sass”: “^3.13.0”nodejs版本: 8.9.0经过查找, 发现在 https://github.com/sass/node-sass/tree/v3.13.1 有这样的描述: Supported Node.js versions 0.10, 0....原创 2018-04-14 14:22:19 · 592 阅读 · 0 评论 -
ajax跨域解决方案总结
ajax跨域解决方案总结前端开发中经常会碰到各种跨域问题,在此做一总结。 实验代码: https://github.com/GerryLon/cors什么是跨域?先来讲讲什么是跨域?XMLHttpRequest同源策略:禁止使用XHR对象向不同源的服务器地址发起HTTP请求。DOM同源策略:禁止对不同源页面DOM进行操作。这里主要场景是iframe跨域的情况,不同域名...原创 2018-05-04 14:10:12 · 622 阅读 · 0 评论 -
gulp watch error on CentOS 7
at errnoException (fs.js:1031:11)at FSWatcher.start (fs.js:1063:11)at Object.fs.watch (fs.js:1088:11)echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -pref: https转载 2017-06-19 18:33:30 · 677 阅读 · 0 评论 -
yargs使用总结
yargs是nodejs环境下的命令行参数解析工具, 其github地址: https://github.com/yargs/yargs我用的版本是: ^10.0.3看看在gulp中的使用:var argv = require('yargs').argv;console.log('编译参数: \r\n', argv, '\r\n');$ gulp build --modul...原创 2017-12-15 19:53:40 · 8926 阅读 · 0 评论 -
gulp.spritesmith使用总结
gulp.spritesmithnpm地址: https://www.npmjs.com/package/gulp.spritesmith我使用的版本: ^6.7.0合并雪碧图, 假定需要合并的小图为CONFIG.src + '/img/slice/*.png', 具体情况自己配置即可.gulp.task('sprite', function() { var spriteData = gu原创 2017-12-15 19:36:06 · 1584 阅读 · 0 评论 -
Cannot find module '.tmp/Rx.min.js'
使用mgechev/angular-seed时, npm start报错:[21:22:01] 'build.dev' errored after 7.24 s[21:22:01] Error in plugin 'run-sequence(build.html_css)'Message: Cannot find module '.tmp/Rx.min.js'Details:翻译 2017-06-20 21:49:16 · 1291 阅读 · 0 评论