Cannot find module '../built/cli.js' when running Protractor

alecxe

Because of the present in Protractor 3.3.0 issue with getMultiCapabilities, we have to install Protractor directly from github since the master branch contains the fix which is scheduled for Protractor 3.4.

In package.json we've added the following:

"dependencies": {
  "protractor": "git+https://github.com/angular/protractor.git"
},

And, now, we are getting the following error when trying to run protractor:

> protractor conf.js

module.js:341
    throw err;
    ^

Error: Cannot find module '../built/cli.js'

Is it something we are doing wrong, or Protractor development version cannot be installed and used this way?

Xotabu4

As far as i see, one step is missing. Protractor has prepublish step in package.json , you can call it manually, or try to do the same as this step do:

Error: Cannot find module '../built/cli.js'

What i see in https://github.com/angular/protractor/blob/master/gulpfile.js#L76:

gulp.task('prepublish', function(done) {
  runSequence(['typings', 'jshint', 'format'], 'tsc', 'tsc:globals', 'types',
    'ambient', 'built:copy', done);
});

gulp.task('built:copy', function() {
  return gulp.src(['lib/**/*','!lib/**/*.ts'])
      .pipe(gulp.dest('built/'));
});

I think you just need to do postinstall task, that will copy that files to destination.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Error: cannot find module "react-scripts/scripts/init.js' when tryping to install react app

From Dev

Node js and phantomjs - Cannot find module 'weak'

From Dev

Node.js - "Cannot find module", when the module call other module

From Dev

Handling "Cannot find module" error when calling node.js fork

From Dev

Error: cannot find module when testing with mocha

From Dev

uglify-js in nodeJS "Cannot find module"

From Dev

Node.js cannot find an installed module

From Dev

TypeScript cannot find js module in same folder

From Dev

Error: Cannot find module 'js-yaml' when running "bower install"

From Dev

Karma Not Running - cannot find module gulp

From Dev

Error: Error: Cannot find module ' in angular js?

From Dev

'Cannot find module' when import in TypeScript

From Dev

Cannot find module 'chart.js'

From Dev

Node.js: Cannot find module 'chai'

From Dev

Error: Cannot find module 'jasmine-expect' [Protractor]

From Dev

module.js cannot find modules when running iron-node

From Dev

Cannot find module gulp.js when publishing to Azure

From Dev

Node js and phantomjs - Cannot find module 'weak'

From Dev

Protractor cannot find angular

From Dev

Cannot find module 'promise' when uploading to heroku

From Dev

cannot find name when running AutoExec macro

From Dev

cannot find node.js module

From Dev

module.js cannot find modules when running iron-node

From Dev

Cannot find dependency when running krakenjs generator

From Dev

Typescript+Gulp+Protractor => Cannot find module config.js

From Dev

Getting cannot find HelloWorld.js when running simple nodejs via Docker

From Dev

Cannot find module 'markdown-js'

From Dev

Cannot find module './*.env' node js

From Dev

"Cannot find module" error message when deploying a node.js program on Heroku or RedHat Openshift Online

Related Related

  1. 1

    Error: cannot find module "react-scripts/scripts/init.js' when tryping to install react app

  2. 2

    Node js and phantomjs - Cannot find module 'weak'

  3. 3

    Node.js - "Cannot find module", when the module call other module

  4. 4

    Handling "Cannot find module" error when calling node.js fork

  5. 5

    Error: cannot find module when testing with mocha

  6. 6

    uglify-js in nodeJS "Cannot find module"

  7. 7

    Node.js cannot find an installed module

  8. 8

    TypeScript cannot find js module in same folder

  9. 9

    Error: Cannot find module 'js-yaml' when running "bower install"

  10. 10

    Karma Not Running - cannot find module gulp

  11. 11

    Error: Error: Cannot find module ' in angular js?

  12. 12

    'Cannot find module' when import in TypeScript

  13. 13

    Cannot find module 'chart.js'

  14. 14

    Node.js: Cannot find module 'chai'

  15. 15

    Error: Cannot find module 'jasmine-expect' [Protractor]

  16. 16

    module.js cannot find modules when running iron-node

  17. 17

    Cannot find module gulp.js when publishing to Azure

  18. 18

    Node js and phantomjs - Cannot find module 'weak'

  19. 19

    Protractor cannot find angular

  20. 20

    Cannot find module 'promise' when uploading to heroku

  21. 21

    cannot find name when running AutoExec macro

  22. 22

    cannot find node.js module

  23. 23

    module.js cannot find modules when running iron-node

  24. 24

    Cannot find dependency when running krakenjs generator

  25. 25

    Typescript+Gulp+Protractor => Cannot find module config.js

  26. 26

    Getting cannot find HelloWorld.js when running simple nodejs via Docker

  27. 27

    Cannot find module 'markdown-js'

  28. 28

    Cannot find module './*.env' node js

  29. 29

    "Cannot find module" error message when deploying a node.js program on Heroku or RedHat Openshift Online

HotTag

Archive