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

CP-993 Basic example project #98

Closed
wants to merge 3 commits into from
Closed

Conversation

poenneby
Copy link

Here's a basic example separating the sources from the tests

@poenneby
Copy link
Author

Hey, anyone care to merge this pull request?


jspm install

npm install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm install should come before jspm install in case the user doesn't have jspm globally installed.

@maxwellpeterson-wf
Copy link
Contributor

Looks good except for that one comment.
@jayudey-wf can you test this when you have a chance?

@jayudey-wf jayudey-wf changed the title Basic example project CP-993 Basic example project Sep 17, 2015
@trentgrover-wf
Copy link
Collaborator

@evanweible-wf
Copy link
Contributor

+1

@MeoMix
Copy link

MeoMix commented Sep 21, 2015

Err.... sorry... maybe this is just me, but isn't it supposed to be "baseURL" not "baseUrl"? I feel like this is effectively not using a baseURL which, unsurprisingly, works fine..

@poenneby
Copy link
Author

In the initial commit I had incorrectly added "baseUrl" to config.js but this was removed in my last commit.
The goal of this project was to provide the simplest configuration to get people started.
The issue with baseURL still exist but a possible solutions have been suggested here: #91 (comment)
I still believe this example serves as a good starting point to explore solutions for the above mentioned issues... Sorry about any confusion.

@maxwellpeterson-wf
Copy link
Contributor

+1

1 similar comment
@evanweible-wf
Copy link
Contributor

+1

@trentgrover-wf
Copy link
Collaborator

@jayudey-wf ready for merge

@jayudey-wf
Copy link
Contributor

when trying to run the tests in the example i'm seeing this error @poenneby

npm run test

> basic@1.0.0 test /Users/jayudey/workiva/karma-jspm/examples/basic
> karma start

12 10 2015 10:08:17.773:INFO [karma]: Karma v0.13.10 server started at http://localhost:9876/
12 10 2015 10:08:17.779:INFO [launcher]: Starting browser PhantomJS
12 10 2015 10:08:18.619:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket fCIQLtq5oXdGQtFYAAAA with id 80471356
12 10 2015 10:08:19.928:WARN [web-server]: 404: /base/stream/index.js
12 10 2015 10:08:20.046:WARN [web-server]: 404: /base/buffer.js
12 10 2015 10:08:20.047:WARN [web-server]: 404: /base/events.js
12 10 2015 10:08:20.047:WARN [web-server]: 404: /base/stream/index.js
12 10 2015 10:08:20.048:WARN [web-server]: 404: /base/util.js
12 10 2015 10:08:20.049:WARN [web-server]: 404: /base/jspm_packages/npm/string_decoder@0.10.31/
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR: 'Potentially unhandled rejection [7] Error: XHR error (404 Not Found) loading http://localhost:9876/base/stream/index.js
    Error loading http://localhost:9876/base/stream/index.js as "stream/index" from http://localhost:9876/base/jspm_packages/npm/readable-stream@1.1.13/readable.js
    Error loading http://localhost:9876/base/test/hello.spec.js
    at http://localhost:9876/base/jspm_packages/system.src.js?4cf2029bbbbc9b776337cc3b2c67ab2beea97a00:740
    at tryCatchReject (http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:1257)
    at runContinuation1 (http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:1216)
    at http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:1037
    at http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:895
    at http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:171
    at http://localhost:9876/base/jspm_packages/system-polyfills.src.js?56a387e9b39188a3e391f91f0b045fcb0074ef81:136'

12 10 2015 10:08:30.068:WARN [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.


npm ERR! basic@1.0.0 test: `karma start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the basic@1.0.0 test script.
npm ERR! This is most likely a problem with the basic package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     karma start
npm ERR! You can get their info via:
npm ERR!     npm owner ls basic
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.3.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test"
npm ERR! cwd /Users/jayudey/workiva/karma-jspm/examples/basic
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/jayudey/workiva/karma-jspm/examples/basic/npm-debug.log
npm ERR! not ok code 0

@poenneby
Copy link
Author

@jayudey-wf I am not able to reproduce that error.
Are you running

npm install
jspm install
npm run test

With empty node_modules and jspm_packages folders?
I tried a jspm install just there followed by a jspm dl-loader --latest as I was getting warnings about babel version not being compatible with version of jspm.
Don't know if it is related but worth rerunning those...

@jayudey-wf
Copy link
Contributor

that command resolved a warning during my jspm install but I'm still un-able to run npm run test without encountering the aforementioned error

@maxwellpeterson-wf
Copy link
Contributor

I'll give this a try

@maxwellpeterson-wf
Copy link
Contributor

maxwellpeterson-wf commented Oct 14, 2015

I can get past the error Jay is getting by removing config.js and running jspm install again (essentially generating a fresh config.js), but then I get stuck here:

> karma start

14 10 2015 10:49:09.792:INFO [karma]: Karma v0.13.10 server started at http://localhost:9876/
14 10 2015 10:49:09.799:INFO [launcher]: Starting browser PhantomJS
14 10 2015 10:49:10.842:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket a6oqw6Azi6fobF89AAAA with id 75554839
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR: 'Potentially unhandled rejection [7] TypeError: Attempted to assign to readonly property.
    Evaluating http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91/traceur.js
    Error loading http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91/traceur.js as "github:jmcriffey/bower-traceur@0.0.91/traceur" from http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91.js
    Error loading http://localhost:9876/base/test/hello.spec.js (WARNING: non-Error used)'

14 10 2015 10:49:21.078:WARN [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.

@poenneby what version of jspm are you running this with? I am on jspm 0.16.12.

@poenneby
Copy link
Author

Same version as you:
jspm -v
0.16.12
Running against local jspm install.

And the command works for me:

karma start
14 10 2015 21:30:01.209:INFO [karma]: Karma v0.13.10 server started at
http://localhost:9876/
14 10 2015 21:30:01.216:INFO [launcher]: Starting browser PhantomJS
14 10 2015 21:30:02.224:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected
on socket BrXOIoeazoNsHH8OAAAA with id 71462043
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 1 of 1 SUCCESS (0.003 secs /
0.001 secs)

On Wed, Oct 14, 2015 at 5:51 PM, Max Peterson notifications@github.com
wrote:

I can get passed the error Jay is getting by removing config.js and
running jspm install again (essentially generating a fresh config.js),
but then I get stuck here:

karma start

14 10 2015 10:49:09.792:INFO [karma]: Karma v0.13.10 server started at http://localhost:9876/
14 10 2015 10:49:09.799:INFO [launcher]: Starting browser PhantomJS
14 10 2015 10:49:10.842:INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket a6oqw6Azi6fobF89AAAA with id 75554839
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR: 'Potentially unhandled rejection [7] TypeError: Attempted to assign to readonly property. Evaluating http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91/traceur.js Error loading http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91/traceur.js as "github:jmcriffey/bower-traceur@0.0.91/traceur" from http://localhost:9876/base/jspm_packages/github/jmcriffey/bower-traceur@0.0.91.js Error loading http://localhost:9876/base/test/hello.spec.js (WARNING: non-Error used)'

14 10 2015 10:49:21.078:WARN [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.

@poenneby https://github.com/poenneby what version of jspm are you
running this with? I am on jspm 0.16.12.


Reply to this email directly or view it on GitHub
#98 (comment).

@mhipszki
Copy link

mhipszki commented Nov 8, 2015

@poenneby I've cloned your fork and checked out the example project, for me it was working with the latest jspm 0.16.14 but running jspm install showed warnings, saying that dependencies are unsupported by this version of jspm:

$ jspm install
     Looking up npm:babel-core
     Looking up npm:babel-runtime
     Looking up npm:core-js
     Updating registry cache...
     Downloading npm:core-js@1.1.3
     Downloading npm:babel-runtime@5.8.20
     Downloading npm:babel-core@5.8.23
     Looking up github:jspm/nodelibs-process
ok   Installed babel as npm:babel-core@^5.8.22 (5.8.23)
     Looking up npm:process
ok   Installed github:jspm/nodelibs-process@^0.1.0 (0.1.1)
ok   Installed npm:process@^0.10.0 (0.10.1)
ok   Installed babel-runtime as npm:babel-runtime@^5.8.20 (5.8.20)
     Looking up github:systemjs/plugin-json
     Looking up github:jspm/nodelibs-fs
ok   Installed github:jspm/nodelibs-fs@^0.1.0 (0.1.2)
ok   Installed github:systemjs/plugin-json@^0.1.0 (0.1.0)
ok   Installed core-js as npm:core-js@^1.1.0 (1.1.3)
ok   Install tree has no forks.

warn babel@5.8.23 is unsupported for this version of jspm. Use jspm dl-loader --latest to update.

warn babel-runtime@5.8.20 is unsupported for this version of jspm. Use jspm dl-loader --latest to update.

warn core-js@1.1.3 is unsupported for this version of jspm. Use jspm dl-loader --latest to update.
     Looking up loader files...
       system.js.map
       system.src.js
       system.js
       system-csp-production.js
       system-csp-production.src.js
       system-polyfills.js
       system-csp-production.js.map
       system-polyfills.src.js
       system-polyfills.js.map

     Using loader versions:
       systemjs@0.19.5
ok   Loader files downloaded successfully

ok   Install complete.

I had to run jspm dl-loader --latest to update them, and as a result the config.js and the jspm related stuff in package.json was overwritten as @maxwellclarke-wf mentioned above

also, it'd be great to extend the example with jspm plugins or other github/npm packages wired up correctly as people seem struggling with that due to lack of working examples, see my comment here #82

@maxwellclarke-wf perhaps it'd be worth to extend the karma-jspm readme with some plugin wiring up tips?

@poenneby
Copy link
Author

Hello! I'm doing some PR housekeeping - does this still interest anyone or can I close this PR?
I must admit I have not used JSPM for a good while and this stuff may be totally outdated now...

@mhipszki
Copy link

@poenneby nope, feel free to close this one :)

@poenneby poenneby closed this May 11, 2017
@poenneby
Copy link
Author

Thanks for confirming @mhipszki

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

Successfully merging this pull request may close these issues.

7 participants