Error: spawn UNKNOWN

前端 未结 2 1185
后悔当初
后悔当初 2021-01-23 17:54

I am trying to follow the tutorial at https://docs.angularjs.org/tutorial and have an error running the command

npm run protractor

Here is the

相关标签:
2条回答
  • 2021-01-23 18:40

    in your conf.js file change to chromeOnly: false

    exports.config = {
      allScriptsTimeout: 11000,
    
      specs: [
        'e2e/*.js'
      ],
    
      capabilities: {
        'browserName': 'chrome'
      },
    
      chromeOnly: false,
    
      baseUrl: 'http://localhost:8000/',
    
      framework: 'jasmine',
    
      jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
      }
    };
    

    similer issue you can find here #176

    0 讨论(0)
  • 2021-01-23 18:52

    For those who are on a Mac and getting this error, the following open issue can cause this: https://github.com/angular/webdriver-manager/issues/476

    The solution is provided by ciekawy. In

    node_modules/webdriver-manager/built/lib/files/file_manager.js or

    node_modules/protractor/webdriver-manager/built/lib/files/file_manager.js

    add the following code at line 166:

    fileUrl.url = fileUrl.url.replace(/_m1/, '');
    

    You will then need to update the chrome drivers to pick up the change. If using NRWL's NX monorepo management tools:

    npx webdriver-manager clean
    npx webdriver-manager update --gecko=false --versions.chrome=<version from chrome://versions>
    
    0 讨论(0)
提交回复
热议问题