简体   繁体   中英

'.' is not recognized as internal or external command?

Problem:

In my angular project, I have these flowing command in my package.json file.

"scripts": {
    "ng": "ng",
    "start": "ng serve --open",
    "start:prod": "npm run build:prod && npm run server",
    "build": "ng build",
    "build:prod": "ng build --prod",
    "lint": "ng lint",
    "test": "ng lint && ng test --configuration=test",
    "watch": "ng test --configuration=test --browsers ChromeHeadless --watch --reporters dots",
    "e2e": "ng e2e",
    "e2e:ci": "ng e2e --webdriver-update false",
    "pree2e:ci": "./node_modules/protractor/bin/webdriver-manager clean && ./node_modules/protractor/bin/webdriver-manager update --versions.chrome=62.0.3202",
    "ci": "npm run format:test && ng lint && ng test --configuration=test --browsers ChromeTravisCi --code-coverage && npm run e2e:ci && npm run build:prod -- --deploy-url /angular-ngrx-material-starter/ --base-href /angular-ngrx-material-starter",
    "format:write": "prettier projects/**/*.{ts,json,md,scss} --write",
    "format:test": "prettier projects/**/*.{ts,json,md,scss} --list-different",
    "release": "standard-version && git push --follow-tags origin master",
    "analyze": "npm run build:prod -- --stats-json && webpack-bundle-analyzer ./dist/angular-ngrx-material-starter/stats-es2015.json",
    "server": "node ./projects/server/server.js",
    "contributors:add": "all-contributors add",
    "contributors:generate": "all-contributors generate && node .all-contributors-html.js",
    "contributors:check": "all-contributors check"
  },

But when I try to run npm run pree2e:ci it is giving me this error. .' is not recognized as an internal or external command, .' is not recognized as an internal or external command, . I search a lot but I was unable to find a valid reason. When I just hit this command on the bash it is working. ./node_modules/protractor/bin/webdriver-manager clean &&./node_modules/protractor/bin/webdriver-manager update --versions.chrome=62.0.3202 . But when I just run npm run command it is not working. Can someone help me with this issue? . Thank you

You need to change

"./node_modules/protractor/bin/webdriver-manager clean && ./node_modules/protractor/bin/webdriver-manager update --versions.chrome=62.0.3202"

By see into the documentation: link

"./node_modules/protractor/bin/webdriver-manager clean && ./node_modules/protractor/bin/webdriver-manager update --versions.chrome 62.0.3202"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM