Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gulp build on jspm branch fails #25

Open
seangwright opened this issue Aug 4, 2015 · 5 comments
Open

Gulp build on jspm branch fails #25

seangwright opened this issue Aug 4, 2015 · 5 comments

Comments

@seangwright
Copy link

When I run gulp build on the jspm branch the build task fails. I don't know enough yet about jspm to understand if this is an issue with the gulp task.

From what I can see, the bundling process is looking for common/common.js file in the wrong location (not relative to app folder).

    $ gulp build
[13:10:11] Using gulpfile c:\dev\tutorials\NG6-starter\Gulpfile.js
[13:10:11] Starting 'build'...
[13:10:12] 'build' errored after 1.27 s
[13:10:12] Error: Error loading "common/common" at file:c:/dev/tutorials/NG6-starter/common/common.js
Error loading "common/common" from "client\app\app" at file:c:/dev/tutorials/NG6-starter/client/app/app.js
ENOENT, open 'c:\dev\tutorials\NG6-starter\common\common.js'
    at Error (native)
@MikeJoyce19
Copy link

+1 I tried messing around with baseUrl and lib paths but that messed things up even further. I think this has to do with potentially the expression that's passed in to bundleSFX

var resolveTo = function(resolvePath) {
    return function(glob) {
        glob = glob || '';
        return path.join(root, resolvePath, glob);
    }
};

var resolveToApp = resolveTo('app'); // app/{glob}

return jspm.bundleSFX(resolveToApp('app'), dist, {})

Replacing the first param to just 'client/app/app' fixes this problem (which is strange because shouldn't that be the exact same as what resolveToApp is doing? I'm thinking that this could be an issue with system.js bundler not being able to handle paths correctly?

Anyways, bundling works after this change but there's then an error with CSS imports and the CSS plugin

@danthareja
Copy link
Contributor

Thanks for filing the issue guys. I'll take a look at this as soon as I get a chance. @MikeJoyce19 do you mind opening another issue for the css error you are getting?

@MikeJoyce19
Copy link

I've also posed this question in the systemjs gitter. I'll link to an issue or response if one is created.

@EranSch
Copy link

EranSch commented Oct 19, 2015

FYI, I was experiencing the same issue here. My pull request, #52, has been merged and should take care of it... it has for me anyway 😄

Can anyone else confirm?

@kmturley
Copy link

I was getting a similar error:

Using gulpfile ~/Sites/NG6-starter/Gulpfile.js
Starting 'build'...
'build' errored after 895 ms
Error on translate for app/app.js at file:///Users/kimturley/Sites/NG6-starter/client/app/app.js
    Error: ENOENT, open '/Users/kimturley/Sites/NG6-starter/client/jspm_packages/npm/babel-core@5.8.25.js'
    at Error (native)
    Error loading file:///Users/kimturley/Sites/NG6-starter/client/jspm_packages/npm/babel-core@5.8.25.js

I fixed by running this command first:

jspm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants