我遇到一些很奇怪的东西。基本上我正在一个有角度的项目,我开始在一台不同的机器,然后将项目保存在github上,今天我克隆了另一台机器,但是当我运行npm开始我有一个很好的错误信息:
C:\Users\antobbo\Documents\angularjsProjects\todoList>npm start > angular-quickstart@1.0.0 start C:\Users\antobbo\Documents\angularjsProjects\todoList > tsc && concurrently "tsc -w" "lite-server" node_modules/protractor/built/browser.d.ts(260,37): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/browser.d.ts(267,55): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/browser.d.ts(267,78): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/browser.d.ts(358,31): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/browser.d.ts(369,26): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/browser.d.ts(425,36): error TS2503: Cannot find namespace 'webdriver'. node_modules/protractor/built/ptor.d.ts(13,29): error TS2503: Cannot find namespace 'webdriver'. npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" npm ERR! node v6.9.2 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! angular-quickstart@1.0.0 start: `tsc && concurrently "tsc -w" "lite-server" ` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular-quickstart@1.0.0 start script 'tsc && concurrently "tsc -w" "lite-server" '. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do,this is most likely a problem with the angular-quickstart package,npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! tsc && concurrently "tsc -w" "lite-server" npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs angular-quickstart npm ERR! Or if that isn't available,you can get their info via: npm ERR! npm owner ls angular-quickstart npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Users\antobbo\Documents\angularjsProjects\todoList\npm-debug.log
值得注意的是,我有最新版本的节点和npm,但是我确实使用了一个有角度的快速启动,一切都在另一台机器上运行正常。
我也有log here
到目前为止,我已经卸载并重新安装节点,但没有效果。有人有任何建议,请记住,正如我所说,该应用程序确实在另一台机器上工作,我可以从npm开始运行它?
编辑:好的,我以为我为初学者添加了一个小笔记,因为我犯了一个小孩的错误。我说我在我的package.json中找不到任何selenium webdriver,这是因为我已经在我的项目上运行了nmp安装 – 你明白我是一个真正的初学者,具有angularjs2和nodejs,所以我完全删除了我的项目,克隆再次,在运行任何其他命令之前,查找我的package.json,发现devDependencies下的违规行,并更改为建议的内容。它现在工作了
在package.json中,我改变了
原文链接:https://www.f2er.com/angularjs/144896.html“@ types / selenium-webdriver”:“^ 2.53.33”
至
“@ types / selenium-webdriver”:“2.53.33”
它现在编译TypeScript。
看来今天发布的更新破坏了一些东西。