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

can't figure out even a basic project... #225

Closed
lookfirst opened this Issue Jul 10, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@lookfirst
Contributor

lookfirst commented Jul 10, 2015

trying to setup a basic project with latest jspm/builder/systemjs and it just won't work.

https://github.com/lookfirst/broken

npm install
gulp

@guybedford I gave you commit access. I'd love it if you could figure this out.

@nathanboktae

This comment has been minimized.

Show comment
Hide comment
@nathanboktae

nathanboktae Jul 11, 2015

You too? simply going new Builder() in gulp blows up for me. You're much farther along.

var Builder = require('systemjs-builder')
gulp.task('build', function () {
  var builder = new Builder()
})

results in:

[16:59:48] Using gulpfile ~/work/clean-portal/client/gulpfile.js
[16:59:48] Starting 'build'...
[16:59:48] 'build' errored after 91 ms
[16:59:48] ModuleEvaluationError: undefined is not a function
    at needsPolyfill (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1879:34)
    at polyfillMap (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1889:9)
    at /Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1553:14
    at Array.forEach (native)
    at polyfillAll (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1552:15)
    at /Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:3494:3

I cloned your project and tried ./ as the baseURL as I had to do that to get mine working (outside of gulp) but no dice for your issue. Also tried .. btw thanks for the angularjs-systemjs-seed project - I used that a lot.

nathanboktae commented Jul 11, 2015

You too? simply going new Builder() in gulp blows up for me. You're much farther along.

var Builder = require('systemjs-builder')
gulp.task('build', function () {
  var builder = new Builder()
})

results in:

[16:59:48] Using gulpfile ~/work/clean-portal/client/gulpfile.js
[16:59:48] Starting 'build'...
[16:59:48] 'build' errored after 91 ms
[16:59:48] ModuleEvaluationError: undefined is not a function
    at needsPolyfill (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1879:34)
    at polyfillMap (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1889:9)
    at /Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1553:14
    at Array.forEach (native)
    at polyfillAll (/Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:1552:15)
    at /Users/nblack/work/clean-portal/client/node_modules/systemjs-builder/node_modules/traceur/bin/traceur.js:3494:3

I cloned your project and tried ./ as the baseURL as I had to do that to get mine working (outside of gulp) but no dice for your issue. Also tried .. btw thanks for the angularjs-systemjs-seed project - I used that a lot.

@lookfirst

This comment has been minimized.

Show comment
Hide comment
@lookfirst

lookfirst Jul 11, 2015

Contributor

That exception looks like some weirdness with a traceur default? I've also noticed that traceur gets added to my jspm devDeps... which seems kind of weird given that I don't want to use it and specify babel for things.

Contributor

lookfirst commented Jul 11, 2015

That exception looks like some weirdness with a traceur default? I've also noticed that traceur gets added to my jspm devDeps... which seems kind of weird given that I don't want to use it and specify babel for things.

@guybedford

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 11, 2015

Member

Yes Traceur is used for builder transformations.

@lookfirst as mentioned in gitter, using paths for setting extensions is no longer supported as in https://github.com/lookfirst/broken/blob/master/gulpfile.babel.js#L38. Rather remove the default extensions here.

@nathanboktae are you able to just require Traceur? Like require('systemjs-builder/node_modules/traceur/bin/traceur.js)?

Member

guybedford commented Jul 11, 2015

Yes Traceur is used for builder transformations.

@lookfirst as mentioned in gitter, using paths for setting extensions is no longer supported as in https://github.com/lookfirst/broken/blob/master/gulpfile.babel.js#L38. Rather remove the default extensions here.

@nathanboktae are you able to just require Traceur? Like require('systemjs-builder/node_modules/traceur/bin/traceur.js)?

@lookfirst

This comment has been minimized.

Show comment
Hide comment
@lookfirst

lookfirst Jul 11, 2015

Contributor

If I use the jspm builder, then I get the "[10:42:06] TypeError: baseURL should only be configured once and must be configured first.", but if I use the systemjs-builder builder, then things are ok. I've updated the broken project mentioned above to show you.

There is also an issue where the source map urls that are generated at the top level are based at the wrong url root. it goes up one level of ../ too much.

Contributor

lookfirst commented Jul 11, 2015

If I use the jspm builder, then I get the "[10:42:06] TypeError: baseURL should only be configured once and must be configured first.", but if I use the systemjs-builder builder, then things are ok. I've updated the broken project mentioned above to show you.

There is also an issue where the source map urls that are generated at the top level are based at the wrong url root. it goes up one level of ../ too much.

@nathanboktae

This comment has been minimized.

Show comment
Hide comment
@nathanboktae

nathanboktae Jul 12, 2015

@nathanboktae are you able to just require Traceur? Like require('systemjs-builder/node_modules/traceur/bin/traceur.js)?

Nope I'm not - which leads to some odd interaction between gulp and Traceur, so I didn't file an issue here. Also systemjs-builder still needs it even though you specify babel as the transpiler, or don't use ES6 code.

nathanboktae commented Jul 12, 2015

@nathanboktae are you able to just require Traceur? Like require('systemjs-builder/node_modules/traceur/bin/traceur.js)?

Nope I'm not - which leads to some odd interaction between gulp and Traceur, so I didn't file an issue here. Also systemjs-builder still needs it even though you specify babel as the transpiler, or don't use ES6 code.

@guybedford

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 12, 2015

Member

@lookfirst thanks, can you share a test case by any chance with the source map URL issue?

@nathanboktae that's really strange you can't even require Traceur in Node. It sounds like an interaction unrelated to jspm, but if you can share the code I can try to take a look. As mentioned in the previous comment we always use Traceur for additional code transformations during builds, even when transpiling via Babel.

Member

guybedford commented Jul 12, 2015

@lookfirst thanks, can you share a test case by any chance with the source map URL issue?

@nathanboktae that's really strange you can't even require Traceur in Node. It sounds like an interaction unrelated to jspm, but if you can share the code I can try to take a look. As mentioned in the previous comment we always use Traceur for additional code transformations during builds, even when transpiling via Babel.

@lookfirst

This comment has been minimized.

Show comment
Hide comment
@lookfirst

lookfirst Jul 12, 2015

Contributor

@guybedford clone the broken project that I mentioned before, npm install and run gulp and look at the generated map file.

On Jul 12, 2015, at 3:14 AM, Guy Bedford notifications@github.com wrote:

@lookfirst thanks, can you share a test case by any chance with the source map URL issue?

@nathanboktae that's really strange you can't even require Traceur in Node. It sounds like an interaction unrelated to jspm, but if you can share the code I can try to take a look. As mentioned in the previous comment we always use Traceur for additional code transformations during builds, even when transpiling via Babel.


Reply to this email directly or view it on GitHub.

Contributor

lookfirst commented Jul 12, 2015

@guybedford clone the broken project that I mentioned before, npm install and run gulp and look at the generated map file.

On Jul 12, 2015, at 3:14 AM, Guy Bedford notifications@github.com wrote:

@lookfirst thanks, can you share a test case by any chance with the source map URL issue?

@nathanboktae that's really strange you can't even require Traceur in Node. It sounds like an interaction unrelated to jspm, but if you can share the code I can try to take a look. As mentioned in the previous comment we always use Traceur for additional code transformations during builds, even when transpiling via Babel.


Reply to this email directly or view it on GitHub.

@guybedford

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 12, 2015

Member

@lookfirst I've sent lookfirst/broken#1 with your fixes.

Member

guybedford commented Jul 12, 2015

@lookfirst I've sent lookfirst/broken#1 with your fixes.

@guybedford

This comment has been minimized.

Show comment
Hide comment
@guybedford

guybedford Jul 13, 2015

Member

Closing to follow-up separate issues as described in lookfirst/broken#1 (comment).

Member

guybedford commented Jul 13, 2015

Closing to follow-up separate issues as described in lookfirst/broken#1 (comment).

@guybedford guybedford closed this Jul 13, 2015

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