welldone-software / gulp-durandal

Gulp plugin for building durandaljs projects
MIT License
13 stars 19 forks source link

Error : cannot read property 'normalize' of undefined #6

Closed amirjelo closed 10 years ago

amirjelo commented 10 years ago

i have this gulpfile:

var gulp = require('gulp'); var durandal = require('gulp-durandal');

gulp.task('durandal', function(){ durandal({ baseDir: 'App',
main: 'main.js',
output: 'main-built.js', almond: true, minify: true }) .pipe(gulp.dest('build')); });

gulp.task('default', ['durandal']);

and when i want to build i have this error :

error gulp

pleaaasee help me ! weyland is so slow :(

vzaidman commented 10 years ago

Just succeeded to use the plugin with exactly the same settings.

Make sure your paths in main.js are O.K. Have you tried to use it without the "minify" setting? Are you sure your project can be optimized with r.js without the plugin?

Send us the code/file structure if you wish.

amirjelo commented 10 years ago

after lots of research on this problem i found this solution :

just some changes to gulpfile :

var gulp = require('gulp'); var durandal = require('gulp-durandal');

gulp.task('durandal', function(){ durandal({ baseDir: 'app',
main: 'main.js',
output: 'main-built.js', almond: true, minify: true, rjsConfigAdapter : function(rjsConfig){ rjsConfig.deps = ['text']; return rjsConfig; } }) .pipe(gulp.dest('app')); });

gulp.task('default', ['durandal']);

vzaidman commented 10 years ago

Looks like a project specific configuration issue.

Corical commented 9 years ago

Thanks man, helped me as well. Had to add the config dependency.

rjsConfigAdapter.deps = ['text'];