aurelia / bundler

A library for bundling JavaScript, HTML and CSS for use with SystemJS.
MIT License
37 stars 25 forks source link

gulp bundle and text plugin error #118

Closed jaroslawziolkowski closed 8 years ago

jaroslawziolkowski commented 8 years ago

Hi, I have code in build/tasks/bundle.js


var gulp = require('gulp');
var bundle = require('aurelia-bundler').bundle;

var config = {
    force: true,
    baseURL: '.',                   // baseURL of the application
    configPath: './public/js/config.js',      // config.js file. Must be within `baseURL`
    bundles: {
        "public/js/aurelia": {           // bundle name/path. Must be within `baseURL`. Final path is: `baseURL/dist/app-build.js`.
            includes: [
                '[*.js]',
                '*.html!text',
                '*.css!text',
            ],
            options: {
                inject: true,
                minify: true
            }
        },
        "public": {
            includes: [
                'aurelia-bootstrapper',
                'aurelia-fetch-client',
                'aurelia-router',
                'aurelia-animator-css',
                'github:aurelia/templating-binding',
                'github:aurelia/templating-resources',
                'github:aurelia/templating-router',
                'github:aurelia/loader-default',
                'github:aurelia/history-browser',
                'github:aurelia/logging-console',
                'bootstrap/css/bootstrap.css!text'
            ],
            options: {
                inject: true,
                minify: true
            }
        }
    }
};

gulp.task('bundle', function() {
    return bundle(config);
});

when I run

gulp bundle

I see error:

Error: ENOENT, open '/jspm_packages/github/systemjs/plugin-text@0.0.4.js'
        at Error (native)
    Error loading /jspm_packages/github/systemjs/plugin-text@0.0.4.js

but this file exists in my app root dir /jspm_packages/github/systemjs/plugin-text@0.0.4.js

Have you any idea? Because combination with baseUrl create others errors regards to real bad paths.

Thanks in advance for your help.

atsu85 commented 8 years ago

@jaroslawziolkowski, are You using Windows? If so, make sure files are not locked (I've had issues with it, but don't remember the exact error message).

jaroslawziolkowski commented 8 years ago

@atsu85 I'm using debian, permissions for files are ok

jaroslawziolkowski commented 8 years ago

@atsu85 below is ls -la files list from this plugin

root@mx:/var/www/html/myapp# ls jspm_packages/github/systemjs/ -la
total 32
drwxrwxr-x 5 www-data www-data 4096 May 19 05:24 .
drwxrwxr-x 7 www-data www-data 4096 May 18 05:26 ..
drwxrwxr-x 2 www-data www-data 4096 May 18 05:26 plugin-css@0.1.20
-rwxrwxr-x 1 www-data www-data   66 Jan 30 06:41 plugin-css@0.1.20.js
drwxrwxr-x 2 www-data www-data 4096 May 18 05:26 plugin-json@0.1.0
-rwxrwxr-x 1 www-data www-data   67 Jan 30 06:41 plugin-json@0.1.0.js
drwxrwxr-x 2 www-data www-data 4096 May 18 05:26 plugin-text@0.0.4
-rwxrwxr-x 1 www-data www-data   67 Jan 30 06:44 plugin-text@0.0.4.js
ahmedshuhel commented 8 years ago

@jaroslawziolkowski What version of bundler are you using? Could you try v0.4.0 and let us know? Could you also please create a repo that demonstrates the problem?

EisenbergEffect commented 8 years ago

Haven't heard back from the OP in a while, so closing this. Make sure to have the text plugin installed and be running the latest bundler and system.js.