Open dlmoody opened 9 years ago
Could you update the generator and try to reproduce this issue?
npm install -g generator-angular-gulp-browserify
Hey I finally got a chance to try it. it does work. thank you
I am sorry I am still getting that error.
Error: No provider for "framework:browserify"! (Resolving: framework:browserify)
at error (/home/codio/workspace/frontend/node_modules/karma/node_modules/di/lib/injector.js:22:12)
at Object.parent.get (/home/codio/workspace/frontend/node_modules/karma/node_modules/di/lib/injector.js:9:13)
at [object Object].get (/home/codio/workspace/frontend/node_modules/karma/node_modules/di/lib/injector.js:54:19)
at /home/codio/workspace/frontend/node_modules/karma/lib/server.js:137:20
at Array.forEach (native)
at [object Object].Server._start (/home/codio/workspace/frontend/node_modules/karma/lib/server.js:136:21)
at [object Object].invoke (/home/codio/workspace/frontend/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at [object Object].Server.start (/home/codio/workspace/frontend/node_modules/karma/lib/server.js:101:18)
at Gulp.<anonymous> (/home/codio/workspace/frontend/gulp/tasks/unit.js:13:6)
at module.exports (/home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at /home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/index.js:279:18
at finish (/home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at /home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:52:4
at f (/home/codio/workspace/frontend/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/node_modules/once/once.js:17:25)
Hmm, how about:
npm uninstall karma -g
npm install karma-cli -g
plugins: [
require('karma-browserify'),
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-coverage')
],
It seems like karma is not able to resolve dependencies, so let's try to declare it explicitly.
awesome i got past that issue. Thank you !!
I am getting this: Can't find variable: Promise but maybe i just need to import that i dont know i have to research it
I am getting this: Can't find variable: Promise
Promise is a native ES2015 data structure, it should be automatically recognized and transpiled by Babel. Are you sure that babelify is enabled in karma-browserify settings?
preprocessors: {
'app/js/**/*.js': ['browserify', 'coverage']
},
browserify: {
debug: true,
extensions: ['.js', '.jsx'],
transform: [
'babelify',
'bulkify',
istanbul({
instrumenter: isparta,
ignore: ['**/node_modules/**', '**/test/**']
})
]
}
Which node.js version are you using?
I'd recommend clean the cache:
npm clear cache
Delete local node_modules
folder and reinstall dependencies: npm i
it turns out that phantomjs doesnt have support for ES6 Promises. I believe that the fix is to either polyfill phantomjs or use phantomjs2 or some other headless browser that supports Promises. I am useing phantomjs because for this particular thing that I am doing i am setting up on a colud base IDE so there is no browser on the box. No biggy though.
thanks for helping me get it to work and teaching me something about the karma config :-)
On Wed, Nov 11, 2015 at 10:32 AM, Philipp Alferov notifications@github.com wrote:
I am getting this: Can't find variable: Promise
Promise is a native ES2015 data structure, it should be automatically recognized and transpiled by Babel. Are you sure that babelify is enabled in karma-browserify settings?
preprocessors: { 'app/js/*/.js': ['browserify', 'coverage'] }, browserify: { debug: true, extensions: ['.js', '.jsx'], transform: [ 'babelify', 'bulkify', istanbul({ instrumenter: isparta, ignore: ['/node_modules/', '/test/'] }) ] }
Which node.js version are you using? I'd recommend clean the cache: npm clear cache Delete local node_modules folder and reinstall dependencies: npm i
— Reply to this email directly or view it on GitHub https://github.com/alferov/generator-angular-gulp-browserify/issues/5#issuecomment-155817720 .
[image: --]
David Moody [image: https://]about.me/david_moody https://about.me/david_moody?promo=email_sig
Thank you for putting this repo together. I have an issue in that when i run gulp unit i get the following error.