cypress-angularjs-unit-test icon indicating copy to clipboard operation
cypress-angularjs-unit-test copied to clipboard

Can't import module. Got a syntax error: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (2:0) while parsing node_modules/cypress-angularjs-unit-test/src/index.js

Open konclave opened this issue 7 years ago • 1 comments

Bug

  • Cypress 3.1.0, nodejs: 8.9.2, npm: 6.2.0
  • Mac OS 10.13.6
  • Trying to import mount from cypress-angularjs-unit-test installed as npm dependency to my spec file. Expect to import successfully.
  • actual behavior: got an error: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (2:0) while parsing node_modules/cypress-angularjs-unit-test/src/index.js while parsing file: node_modules/cypress-angularjs-unit-test/src/index.js

konclave avatar Sep 10 '18 09:09 konclave

I reproduced this issue. Windows 7, Node 11.1.0, Cypress 3.1.4, npm 6.4.1

Vandivier avatar Feb 05 '19 16:02 Vandivier