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

Error: No provider for "framework:karma-typescript"! #28

Closed
hmil opened this issue Nov 14, 2016 · 5 comments
Closed

Error: No provider for "framework:karma-typescript"! #28

hmil opened this issue Nov 14, 2016 · 5 comments
Labels
Milestone

Comments

@hmil
Copy link

hmil commented Nov 14, 2016

Hi,

I get the following error when using karma-typescript starting at version v2.1.0. This bug does not occur when using the version at commit number 59d06b2050f3073d545edc25a5c5b11ab9de25e7 which is how I am currently working around this bug.
I'm using exactly the config provided in the examples and since it works with an older commit, I can only assume some breaking change went unnoticed betweem 59d06 and v2.1.0

Setup:

MacOSX 10.11.6
nodejs: v4.5.0
npm: 2.15.9
karma: 1.3.0

error:

[12:27:19] Error: No provider for "framework:karma-typescript"! (Resolving: framework:karma-typescript)
    at error (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/node_modules/di/lib/injector.js:22:12)
    at Object.parent.get (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/node_modules/di/lib/injector.js:9:13)
    at get (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/node_modules/di/lib/injector.js:54:19)
    at /Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/lib/server.js:143:20
    at Array.forEach (native)
    at Server._start (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/lib/server.js:142:21)
    at invoke (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/node_modules/di/lib/injector.js:75:15)
    at Server.start (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/karma/lib/server.js:103:18)
    at Gulp.<anonymous> (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/gulpfile.js:304:12)
    at module.exports (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
    at /Users/hadrienmilano/appdy/codebase/eum/synthetic/synthetic-shepherd-webui/node_modules/gulp/bin/gulp.js:129:20
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)
@monounity monounity added the bug label Nov 15, 2016
@monounity
Copy link
Owner

monounity commented Nov 15, 2016

Hey @hmil, is 59d06b2 the latest commit that works before v2.1.0? Does it work if you try the latest from master? Also, could you enable debug logging in karma to see how far karma-typescript makes it before crashing and burning?

EDIT: does f6550e4 or 2ca5747 work for you?

@monounity
Copy link
Owner

If I try to break stuff in framework.js I get a stacktrace that looks like yours, but I also get a more specific error message right before the stacktrace telling me what's gone wrong, do you get that too?

@Karnich
Copy link

Karnich commented Nov 15, 2016

i got the same error. I tried 2.0.9 and it works just fine

hmil pushed a commit to hmil/karma-typescript that referenced this issue Nov 15, 2016
A missing dependency was causing the plugin to not load starting from
v2.1.0
hmil pushed a commit to hmil/karma-typescript that referenced this issue Nov 15, 2016
Missing dependencies were causing the plugin to not load starting from
v2.1.0
@hmil
Copy link
Author

hmil commented Nov 15, 2016

@monounity Yes, 59d06b2 is the last commit that works.
After investigation, it turns out the error comes from missing modules removed in this commit. However, after installing those modules, I still get an error at runtime:

15 11 2016 10:54:05.467:ERROR [karma]: [Error: Cannot find module 'buffer/' from '.']
Error: Cannot find module 'buffer/' from '.'
    at Function.module.exports [as sync] (/project/node_modules/karma-typescript/node_modules/browser-resolve/node_modules/resolve/lib/sync.js:33:11)
    at Function.resolve.sync (/project/node_modules/karma-typescript/node_modules/browser-resolve/index.js:321:21)
    at resolveModules (/project/node_modules/karma-typescript/lib/bundlers/builtin/bundler.js:181:45)
    at appendGlobals (/project/node_modules/karma-typescript/lib/bundlers/builtin/bundler.js:111:13)
    at /project/node_modules/karma-typescript/lib/bundlers/builtin/bundler.js:70:9
    at invokeFunc (/project/node_modules/karma-typescript/node_modules/lodash.debounce/index.js:160:19)
    at trailingEdge (/project/node_modules/karma-typescript/node_modules/lodash.debounce/index.js:207:14)
    at timerExpired [as _onTimeout] (/project/node_modules/karma-typescript/node_modules/lodash.debounce/index.js:195:14)
    at Timer.listOnTimeout (timers.js:92:15)

note that I used the same dependency versions as before they were removed.

@monounity
Copy link
Owner

@hmil, this the same issue as in #24, I'll add the dependencies explicitly since npm apparantly wont pull in all deps for some users...

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

No branches or pull requests

3 participants