Closed XuJinNet closed 7 years ago
The problem seems to be caused by jspm.config.js overrided by jspm.config-extend.js.
@XuJinNet If possible point me to a Github repo that I can use that reproduces this issue. It will be easier for me to debug. Thanks for reporting.
@ahmedshuhel please visit https://github.com/XuJinNet/aurelia-skeleton-esnext Thank you !!!!
Looking at it.
@XuJinNet Does your app run with gulp serve
? I am unable to run it locally. You have config.js
in index.html
but you don't have any file in the project root. Before bundling we need to have a working application.
@ahmedshuhel fixed, please pull, thanks
Looking at it.
@XuJinNet I can bundle your app without any problem. I just had to remove and invalid entry from your bundle config. So, now it looks like this:
var gulp = require('gulp');
var bundler = require('aurelia-bundler');
var bundles = require('../bundles.js');
var config = {
force: true,
baseURL: '.',
configPath: './jspm.config.js',
injectionConfigPath: './jspm.config.js',
bundles: bundles.bundles
};
gulp.task('bundle', ['build'], function() {
return bundler.bundle(config);
});
gulp.task('unbundle', function() {
return bundler.unbundle(config);
});
Simply, configPath: './jspm.config.js'
should be your configPath
as you are only using that in your index.html here. You are not using jspm.config-extended.js
in index.html or anywhere in the app, thus you should not use it in the bundler config. Thank you.
@ahmedshuhel Sorry, i need the file jspm.config-extended.js, i using it in my project, i fixed the repo, please pull, thanks.
Could you please point me to where you have used jquery that you configured in https://github.com/XuJinNet/aurelia-skeleton-esnext/blob/master/jspm.config-extend.js ? Then again, I suppose having two config file is not the issue here. It's about the correctness of SystemJS config. Try importing jquery and use it in your code somewhere and see if your application runs/works and then if the bundling fails please report back.
@ahmedshuhel OK, please pull, thanks. https://github.com/XuJinNet/aurelia-skeleton-esnext/blob/master/src/welcome.js
Looking at it.
I using skeleton-esnext 1.0.0 JSPM Version: 0.16.45
bundle.js
when run
gulp export
orgulp bundle
, get the error:[17:51:03] 'bundle' errored after 864 ms [17:51:03] Error on fetch for npm:jquery@3.1.0.js at file:///Users/xujin/My_Projects/NodeJS/antme-web-client/npm:jquery@3.1.0.js Error: ENOENT: no such file or directory, open '/Users/xujin/My_Projects/NodeJS/antme-web-client/npm:jquery@3.1.0.js' at Error (native)
jspm.config.js
jspm.config-extend.js