我试图打开我从github下载的项目。该项目使用了离子2,但它返回了这个错误:
[ERROR] Gulpfile (or dependent module) not found: .\gulpfile.js
For custom Gulpfile locations, you can run ionic config set gulp.file
<path>. Otherwise, the default Ionic Gulpfile can be downloaded from
https://github.com/ionic-team/ionic-app-base/blob/master/gulpfile.js
Or, if you don't use gulp, you can disable it by running ionic config
set gulp.enabled false.
Full error:
Error: Cannot find module 'ionic-gulp-sass-build'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:\ionic3\exemple
taxi\Ionic-2-Uber-master\gulpfile.js:31:17)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
我尝试了一些解决方案,如:
1 - 删除node_modules文件夹
2 - 从package.json文件中删除gulp-sass
3 - 从package.json文件中删除node-sass(如果你有的话)
4-run npm install gulp-sass --save-dev
还有这个:
1-update version-clean
2-node_module和executenpm install
3 - 可能是npm缓存
但是我仍然有同样的错误。是不是我安装了ionic3并且项目在离子2中运行导致问题?