I have an ASP.NET Core RC1 project that no longer publishes correctly (see publish trace output, below). The gulp min task in the prepublish script defined in project.json is causing the error. If I remove it, the project publishes correctly, but without minifying the js and css files.
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
I have added another Web Project to the solution, and that publishes without error, so I think that eliminates environmental issues. However, I can't see anything substantially different between the test project and the one that fails.
I have also deleted the node_modules folder in the failing project to force Visual Studio to download all the npm packages again.
Finally I ran the dnu publish command in the trace below from the VS command prompt and that also failed.
Can anyone tell me what the problem is from the error trace below, please?
Connecting to C:\svn\Client Applications\yyy\xxx\src\xxxWeb\..\..\artifacts\bin\xxx.Web\Release\PublishOutput...
Environment variables:
Path=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\ptayl_000\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-final\bin\dnu.cmd publish "C:\svn\Client Applications\yyy\xxx\src\xxxWeb" --out "C:\Users\ptayl_000\AppData\Local\Temp\PublishTemp\xxx.Web104" --configuration Release --no-source --runtime dnx-clr-win-x86.1.0.0-rc1-final --wwwroot "wwwroot" --wwwroot-out "wwwroot" --iis-command "web" --quiet
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16202
Executing script 'prepublish' in project.json
v0.10.31
npm WARN package.json ASP.NET#0.0.0 No description
npm WARN package.json ASP.NET#0.0.0 No repository field.
npm WARN package.json ASP.NET#0.0.0 No README data
[07:36:31] Using gulpfile C:\svn\Client Applications\yyy\xxx\src\xxxWeb\gulpfile.js
[07:36:31] Starting 'clean:js'...
[07:36:31] Starting 'clean:css'...
[07:36:31] Finished 'clean:js' after 1.68 ms
[07:36:31] Finished 'clean:css' after 1.99 ms
[07:36:31] Starting 'clean'...
[07:36:31] Finished 'clean' after 9.03 Ξs
[07:36:32] Using gulpfile C:\svn\Client Applications\yyy\xxx\src\xxxWeb\gulpfile.js
[07:36:32] Starting 'min:js'...
[07:36:32] Starting 'min:css'...
[07:36:32] Finished 'min:css' after 61 ms
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : events.js:72
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : throw er; // Unhandled 'error' event
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : ^
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : Error
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at new JS_Parse_Error (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:196:18)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at js_error (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:204:11)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at croak (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:675:9)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at token_error (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:683:9)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at expect_token (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:696:9)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at expect (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:699:36)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:1252:13
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:722:24
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at expr_atom (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:1182:35)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : at maybe_unary (C:\svn\Client Applications\yyy\xxx\src\xxxWeb\node_modules\gulp-uglify\node_modules\uglify-js\lib\parse.js:1358:19)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(152,5): Error : The 'prepublish' script failed with status code 8.
2>Publish failed due to build errors. Check the error list for more details.
Update
The gulp min task contains the following code (from gulp.js):
gulp.task("min:js", function () {
return gulp.src([paths.js, "!" + paths.minJs], { base: "." })
.pipe(concat(paths.concatJsDest))
.pipe(uglify())
.pipe(gulp.dest("."));
});
Update2: event.js
var rx = require("rx");
function normalizeKeypressEvents(args) {
return { value: args[0], key: args[1] };
}
module.exports = function(rl) {
return {
line: rx.Observable.fromEvent(rl, "line"),
keypress: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents),
normalizedUpKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) {
return e.key && (e.key.name === "up" || e.key.name === "k");
}).share(),
normalizedDownKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) {
return e.key && (e.key.name === "down" || e.key.name === "j");
}).share(),
numberKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) {
return e.value && "123456789".indexOf(e.value) >= 0;
}).map(function(e) {
return Number(e.value);
}).share(),
spaceKey: rx.Observable.fromEvent(rl, "keypress", normalizeKeypressEvents).filter(function (e) {
return e.key && e.key.name === "space";
}).share(),
};
};
Turned out that it was a piece of application javascript that was causing the "gulp min" task to fail. The culprit was the following seemingly innocuous piece of code:
$http.get(uri, { params: { config } }).then(function (data) {
return data;
});
I still can't see any problem with it, but as the code had become redundant, I removed it and solved the problem that way.
I was getting the same issues (even on the same line numbers). Paul's own answer gave me a clue to look carefully at my own .js
I commented out most of the file and then progressively uncommented blocks of code until the errors came back.
And the offending code?
This line that uses a template string was the problem:
rtUl.insertAdjacentHTML("beforeend", `<li>${el.toString()}</li>`);
Changing it back to a simple concatenation worked:
rtUl.insertAdjacentHTML("beforeend", "<li>" + el.toString() + "</li>");
It seems that uglify can't read string templates (yet).
Related
I am implementing a VSCode extension and I have set up the project following this link.
It creates a starter project and with it a src/test/runTest.ts:
import * as path from 'path';
import { runTests } from '#vscode/test-electron';
async function main() {
try {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, './suite/index');
// Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) {
console.error('Failed to run tests');
process.exit(1);
}
}
main();
and a package.json:
{
"compile": "tsc -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
}
I cannot run
npm test
twice in a row.
The first time, everything goes well, and it looks like it is downloading VSCode in the folder .vscode-test.
Downloading VS Code 1.65.2 from https://update.code.visualstudio.com/1.65.2/darwin/stable
Downloading VS Code [==============================] 100%Downloaded VS Code 1.65.2 into /my-path/my-project/.vscode-test/vscode-darwin-1.65.2
However, I get a warning:
WARNING: IPC handle "/my-path/my-project/.vscode-test/user-data/1.65.2-main.sock" is longer than 103 chars, try a shorter --user-data-dir
When I run the tests a second time, if fails:
Found existing install in /my-path/my-project/.vscode-test/vscode-darwin-1.65.2. Skipping download
WARNING: IPC handle "/my-path/my-project/.vscode-test/user-data/1.65.2-main.sock" is longer than 103 chars, try a shorter --user-data-dir
[main 2022-03-29T14:44:22.271Z] Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink '/my-path/my-project/.vscode-test/user-data/1.65.2-main.sock'
at unlinkSync (original-fs.js:1210:3)
at ne.claimInstance (/my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:5083)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:2282
at async ne.startup (/my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:2151) {
errno: -2,
syscall: 'unlink',
code: 'ENOENT',
path: '/my-path/my-project/.vscode-test/user-data/1.65.2-main.sock'
}
[main 2022-03-29T14:44:22.274Z] Error: ENOENT: no such file or directory, unlink '/my-path/my-project/.vscode-test/user-data/1.65.2-main.sock'
at unlinkSync (original-fs.js:1210:3)
at ne.claimInstance (/my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:5083)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:2282
at async ne.startup (/my-path/my-project/.vscode-test/vscode-darwin-1.65.2/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:77:2151)
Exit code: 1
Failed to run tests
But it works fine if I delete the folder .vscode-test.
What is happening and what can I do?
try to make your work directory shorter
or
use the os temporary directory
for example:
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: ['--user-data-dir', `${os.tmpdir()}`]
});
After creating a new eslint-plugin for a custom rule, vue-cli-service build fails (eslint works as expected, when triggered by ./node_modules/.bin/eslint --ext .js,.vue,.json ./ --max-warnings=0).
GitHub repository reproducing issue
Starting in an environment with a working vue-cli-service build, following the simplified instructions at https://blog.webiny.com/create-custom-eslint-rules-in-2-minutes-e3d41cb6a9a0, also reproduces the issue. Running vue-cli-service build after every step, it starts failing after step 4: yarn add --dev file:./eslint, and the build still fails after all the steps are completed.
Error message:
ERROR Failed to compile with 32 errors
Module build failed (from ./node_modules/#vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
TypeError: eslint.CLIEngine is not a constructor
at Object.module.exports (MYPATH/node_modules/#vue/cli-plugin-eslint/node_modules/eslint-loader/index.js:223:27)
***repeats 31 more times***
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
vue-cli-service build stills fails after running yarn install, which says it is already up to date.
Most results for this specific TypeError: eslint.CLIEngine is not a constructor error claim the user should upgrade their JetBrains IDE. However, I am running vue-cli-service build on the command line and not using JetBrains.
The code referred to by the error message is (with preceding context):
MYPATH/node_modules/#vue/cli-plugin-eslint/node_modules/eslint-loader/index.js
...
var config = assign(
// loader defaults
{
cacheIdentifier: JSON.stringify({
"eslint-loader": pkg.version,
eslint: eslintVersion || "unknown version"
}),
eslintPath: "eslint"
},
userOptions
);
if (typeof config.formatter === "string") {
try {
config.formatter = require(config.formatter);
if (
config.formatter &&
typeof config.formatter !== "function" &&
typeof config.formatter.default === "function"
) {
config.formatter = config.formatter.default;
}
} catch (_) {
// ignored
}
}
var cacheDirectory = config.cache;
var cacheIdentifier = config.cacheIdentifier;
delete config.cacheIdentifier;
// Create the engine only once per config
var configHash = objectHash(config);
if (!engines[configHash]) {
var eslint = require(config.eslintPath);
engines[configHash] = new eslint.CLIEngine(config); //Error happens here
}
...
Edit: I upgraded #vue/cli-plugin-eslint from version 3.11.0 to 4.1.2 by editing yarn's package.json, at the suggestion of #DelenaMalan below. The build still fails with error:
ERROR Failed to compile with 1 errors 7:51:01 PM
Module build failed (from ./node_modules/#vue/cli-service/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
eslint.CLIEngine is not a constructor
at PoolWorker.fromErrorObj (MYPATH/node_modules/#vue/cli-service/node_modules/thread-loader/dist/WorkerPool.js:262:12)
at MYPATH/node_modules/#vue/cli-service/node_modules/thread-loader/dist/WorkerPool.js:204:29
at mapSeries (MYPATH/node_modules/neo-async/async.js:3625:14)
at PoolWorker.onWorkerMessage (MYPATH/node_modules/#vue/cli-service/node_modules/thread-loader/dist/WorkerPool.js:170:35)
at readBuffer (MYPATH/node_modules/#vue/cli-service/node_modules/thread-loader/dist/WorkerPool.js:152:14)
at Object.module.exports (MYPATH/node_modules/#vue/cli-plugin-eslint/node_modules/eslint-loader/index.js:223:27)
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR Build failed with errors.
error Command failed with exit code 1.
Edit 2:
I deleted and reinstalled the node modules on the repro linked here, as recommended by #CGundlach, but I still have the eslint.CLIEngine is not a constructor error
Annas-MacBook-Pro:eslint-test-project anna$ rm -rf node_modules/
Annas-MacBook-Pro:eslint-test-project anna$ yarn install
yarn install v1.21.1
[1/4] ð Resolving packages...
[2/4] ð Fetching packages...
[3/4] ð Linking dependencies...
warning "#vue/eslint-config-airbnb > eslint-import-resolver-webpack#0.11.1" has unmet peer dependency "webpack#>=1.11.0".
[4/4] ðĻ Building fresh packages...
âĻ Done in 14.14s.
Annas-MacBook-Pro:eslint-test-project anna$ yarn build
yarn run v1.21.1
$ vue-cli-service build
â Building for production...
ERROR Failed to compile with 1 errors 12:28:32 PM
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
eslint.CLIEngine is not a constructor
at PoolWorker.fromErrorObj (/Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/thread-loader/dist/WorkerPool.js:262:12)
at /Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/thread-loader/dist/WorkerPool.js:204:29
at mapSeries (/Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/neo-async/async.js:3625:14)
at PoolWorker.onWorkerMessage (/Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/thread-loader/dist/WorkerPool.js:170:35)
at readBuffer (/Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/thread-loader/dist/WorkerPool.js:152:14)
at Object.module.exports (/Users/anna/projects/yarn-vue-eslint/eslint-test-project/node_modules/eslint-loader/index.js:223:27)
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Make sure all warnings are resolved when you run either npm ci, npm i or yarn install. For me the following warnings were showed after doing a fresh install:
$ vue-cli-service build
â § Building for production...
ERROR Failed to compile with 1 error 20:47:55
Syntax Error: Thread Loader (Worker 0)
eslint.CLIEngine is not a constructor
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
When I did a fresh install and resolved the peer dependency issue by decreasing my eslint version everything works as expected.
So try to downgrade your eslint dependency to the correct version. For me I had to downgrade to eslint < 7.0.0.
npm i -D eslint#6.8.0
# or yarn
yarn add -D eslint#6.8.0
I have a project where Gulp task runner is setup. Everything works perfectly fine in VS2015, but when I upgraded to VS2017 MSBuild started to fail.
The funny thing is, that if I copy out the command line that apparently fails and paste it into the cmd, then it works perfectly fine.
I get the following error:
[09:47:27] Building project: ..\DFS.Client\DFS.Client.csproj
[09:47:27] Using automatic maxcpucount
[09:47:27] Building project: 1 item
[09:47:27] { Error: Command failed: "C:\Program Files
(x86)\MSBuild\14.0\Bin\MSBuild.exe"
"C:\solutions\dfs\code\DFS.Client\DFS.Client.csproj" "/target:Clean;Build"
/verbosity:minimal /toolsversion:14.0 /nologo /maxcpucount
/property:Configuration="Debug" /property:DeployOnBuild="true"
/property:DeployDefaultTarget="WebPublish"
/property:WebPublishMethod="FileSystem"
/property:DeleteExistingFiles="false"
/property:publishUrl="C:\inetpub\wwwroot\dfsdev\Website"
/property:_FindDependencies="true"
at ChildProcess.exithandler (child_process.js:204:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
killed: false,
code: 1,
signal: null,
cmd: '"C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\MSBuild.exe"
"C:\\solutions\\dfs\\code\\DFS.Client\\DFS.Client.csproj"
"/target:Clean;Build" /verbosity:minimal /toolsversion:14.0 /nologo
/maxcpucount /property:Configuration="Debug" /property:DeployOnBuild="true"
/property:DeployDefaultTarget="WebPublish"
/property:WebPublishMethod="FileSystem"
/property:DeleteExistingFiles="false"
/property:publishUrl="C:\\inetpub\\wwwroot\\dfsdev\\Website"
/property:_FindDependencies="true"' }
[09:47:27] Build failed!
If I copy the command line that is stated as failing and run it in CMD it works. I have tried the following fix without any luck.
The gulp task that fails looks like this:
var publishProjects = function (location, dest) {
dest = dest || config.websiteRoot;
var targets = ["Build"];
if (config.runCleanBuilds) {
targets = ["Clean", "Build"];
}
console.log("publish to " + dest + " folder");
return gulp.src([location + "/**/*.csproj"])
.pipe(foreach(function (stream, file) {
return stream
.pipe(debug({ title: "Building project:" }))
.pipe(msbuild({
targets: targets,
configuration: config.buildConfiguration,
logCommand: false,
verbosity: "minimal",
maxcpucount: 0,
toolsVersion: 14.0,
properties: {
DeployOnBuild: "true",
DeployDefaultTarget: "WebPublish",
WebPublishMethod: "FileSystem",
DeleteExistingFiles: "false",
publishUrl: dest,
_FindDependencies: "true"
}
}));
}));
};
Help would be appreciated as I would really like to use VS2017 rather than 2015.
Tools version 14.0 is for VS2015, tools version 15.0 is for VS2017. There is some other config you may need to change to enable it as well. Hope that helps.
Every now and then, when I do a gulp build, I would get this error:
Error: EEXIST, mkdir 'Users/username/Desktop/Project/dist/fonts' at Error (native)
It doesn't happen on every build though. My gulp code to copy over fonts is:
gulp.src(paths.fonts { cwd: bases.app })
.pipe(flatten()) // using gulp-flatten
.pipe(gulp.dest(bases.dist + 'fonts/'));
Is there a way for me to fix this issue?
I believe you have to delete the old fonts/ folder first.
Use something like Gulp del:
I also like gulp-util for gulp console logs:
gulp.task('removeFonts', function(cb) {
del([bases.dist + 'fonts/'], cb);
gutil.log(gutil.colors.magenta('Fonts folder removed');
});
Then call your mkdir build.
We're using gulp-karma plugin to gulp for our testing and PhantomJS. We're running on Windows and PhantomJS is a .exe file. Our files that has the tests has grown and now we're getting the error "spawn ENAMETOOLONG". From what I've gather from this answer: https://github.com/dbushell/grunt-svg2png/issues/17 for Grunt is that the problem is the parameters sendt to PhantomJS is too large. Have anyone had simlar problems or know any work arounds for it (except having to merge test files into fewer files)?
Error message:
[14:20:19] Starting Karma server...
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENAMETOOLONG
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
Give files list into karma config instead of gulp.src()
Example
var files =[
'lib/**/*.js',
'src/**/*.js',
'test/**/*.js'
],
gulp.task('unit.test', function() {
return gulp.src([])
.pipe(karma({
configFile: 'my.karma.conf.js',
files : files,
action: 'run'
}))
.on('error', function(err) {
throw err;
});
});