在es6环境搭建中gulp安装遇到的问题
来源:互联网 发布:cf网站源码 编辑:程序博客网 时间:2024/06/05 08:09
gulpjs的使用介绍及技巧请参考之前转载的文章http://blog.csdn.net/zhanglir333/article/details/78577895
这里讲的是遇到的问题:
安装完成之后,运行gulp -v出现
-bash: gulp: command not found
-bash: gulp: command not found
C:\Users\LiRong\AppData\Local\Temp\360zip$Temp\360$5\UltraEdit\;E:\Program Files\Fiddler;C:\Users\LiRong\AppData\Roaming\npm;E:\Program Files\nodejs\node_modules\npm
后边是自己添加的
- 1
将输出的全局安装路径加入的环境变量的Path条目中即可。
然后就解决了问题,希望可以帮助大家
$ gulp
[16:14:36] Requiring external module babel-register
[16:14:49] Using gulpfile E:\BaiduYunDownload\es6\gulpfile.babel.js
[16:14:49] Starting 'build'...
[16:14:49] Starting 'clean'...
[16:14:49] Finished 'clean' after 20 ms
[16:14:49] Starting 'css'...
[16:14:49] Finished 'css' after 12 ms
[16:14:49] Starting 'pages'...
[16:14:49] Finished 'pages' after 21 ms
[16:14:49] Starting 'scripts'...
[16:14:49] Plumber found unhandled error:
Error in plugin 'webpack-stream'
Message:
multi ./app/js/index.js
Module not found: Error: Can't resolve 'babel' in 'E:\BaiduYunDownload\es6'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'babel-loader' instead of 'babel',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
resolve 'babel' in 'E:\BaiduYunDownload\es6'
Parsed request is a module
using description file: E:\BaiduYunDownload\es6\package.json (relative path: .)
after using description file: E:\BaiduYunDownload\es6\package.json (relative path: .)
resolve as module
E:\BaiduYunDownload\node_modules doesn't exist or is not a directory
E:\node_modules doesn't exist or is not a directory
looking for modules in E:\BaiduYunDownload\es6\node_modules
using description file: E:\BaiduYunDownload\es6\package.json (relative path: ./node_modules)
after using description file: E:\BaiduYunDownload\es6\package.json (relative path: ./node_modules)
using description file: E:\BaiduYunDownload\es6\package.json (relative path: ./node_modules/babel)
no extension
E:\BaiduYunDownload\es6\node_modules\babel doesn't exist
.js
E:\BaiduYunDownload\es6\node_modules\babel.js doesn't exist
.json
E:\BaiduYunDownload\es6\node_modules\babel.json doesn't exist
as directory
E:\BaiduYunDownload\es6\node_modules\babel doesn't exist
[E:\BaiduYunDownload\node_modules]
[E:\node_modules]
[E:\BaiduYunDownload\es6\node_modules\babel]
[E:\BaiduYunDownload\es6\node_modules\babel.js]
[E:\BaiduYunDownload\es6\node_modules\babel.json]
[E:\BaiduYunDownload\es6\node_modules\babel]
@ multi ./app/js/index.js
[16:14:49] Version: webpack 3.8.1
Asset Size Chunks Chunk Names
index.js 2.62 kB 0 [emitted] index
ERROR in multi ./app/js/index.js
Module not found: Error: Can't resolve 'babel' in 'E:\BaiduYunDownload\es6'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
You need to specify 'babel-loader' instead of 'babel',
see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
@ multi ./app/js/index.js
[16:14:49] Finished 'scripts' after 395 ms
[16:14:49] Starting 'browser'...
[16:14:49] Finished 'browser' after 79 μs
[16:14:49] Starting 'serve'...
[16:14:49] Finished 'serve' after 102 μs
[16:14:49] Finished 'build' after 539 ms
[16:14:49] Starting 'default'...
[16:14:49] Finished 'default' after 24 μs
出现该问题时,可以修改tasks/scripts.js中的
module:{ loaders:[{ test:/\.js$/, loader:'babel' }]}
将babel改为babel-loader即可。
- 在es6环境搭建中gulp安装遇到的问题
- 搭建es6+gulp开发环境
- ES6 初体验 —— gulp+Babel 搭建ES6环境
- 环境搭建中遇到的问题
- PHP环境搭建中遇到的问题
- 配置es6编辑环境遇到的问题。
- es6开发环境搭建(gulp实时转码)
- 搭建环境遇到的问题
- VPS环境搭建中使用中遇到的问题
- Pomelo在windows下环境搭建遇到的问题
- 在linux上搭建hadoop环境所遇到的问题
- ubuntu安装到搭建lamp环境所遇到的问题
- 在安装数据库中遇到的问题:
- gulp build遇到的问题
- gulp serve 遇到的问题
- nodejs安装环境搭建--gulp安装
- Fedora 15搭建LAMP环境中可能遇到的问题
- sae云平台java环境搭建中遇到的问题
- vue.js中文社区Demo:vue全家桶,muse-ui
- 产品经理理解
- vue中v-text,v-html, v-model, {{}}之间的异同
- 辗转相除法
- CCF 201503-4 网络延时(树的直径,两次BFS)
- 在es6环境搭建中gulp安装遇到的问题
- kafka中的offset
- Spring框架中IntrospectorCleanupListener的作用
- Activity生命周期
- picture upload view and html2canvas
- 第一次当面试官
- Android消息传递机制总结
- HDU 2203 亲和数(KMP||String)
- Restful API 中的错误处理