SAP/karma-ui5

Error during loading ".../node_modules/karma-ui5" plugin: unknown estree node type 'ImportExpression', new syntax?

pwasem opened this issue · 2 comments

Trying to to run karma gives me the following error:

npx karma start:

14 08 2019 09:50:11.412:ERROR [plugin]: Error during loading "/Users/d068098/Projects/syngenta/tp-ui-infra-util/tp-ui-setting-cycles/node_modules/karma-ui5" plugin:
  unknown estree node type 'ImportExpression', new syntax?
14 08 2019 09:50:11.521:ERROR [karma-server]: Server start failed on port 9876: Error: No provider for "framework:ui5"! (Resolving: framework:ui5)

karma.conf.js looks like this:

module.exports = function (config) {

	config.set({

		logLevel: config.LOG_INFO,

		browserConsoleLogOptions: {
			level: 'info'
		},

		frameworks: ['ui5'],

		ui5: {
			url: 'http://localhost:5000',
			mode: 'html',
			testpage: 'webapp/test/integration/opaTests.qunit.html'
		},

		browsers: ['ChromeHeadless'],

		concurrency: 1,

		singleRun: true,

		browserNoActivityTimeout: 600000,

		proxyValidateSSL: false

	});
};

package.json like this:

{
  "devDependencies": {
    "grunt-karma": "^3.0.2",
    "karma": "^4.1.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-ui5": "^1.0.1",
    "karma-webdriver-launcher": "^1.0.5"
  }
}
matz3 commented

This is related to https://github.com/SAP/ui5-builder/issues/309, which is fixed via SAP/ui5-builder#310 (v1.4.1).

Please re-install the karma-ui5 package to update your lockfile:

npm install karma-ui5

@matz3 Thank you, it is working again.