Error: spawn UNKNOWN

前端 未结 2 1214
后悔当初
后悔当初 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: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=
    

提交回复
热议问题