我已安装karma
npm install karma
并安装了karma typings
所有其他依赖项。但令我惊讶的是,当我运行karma start
时,它发布了错误。
ERROR [plugin]: Error during loading"/node_modules/karma-typescript" plugin: Cannot find module 'browser-resolve'
我错过了什么吗?
我的依赖关系如下:
"devDependencies": {
"@types/jasmine": "^2.5.35",
"@types/karma": "^0.13.33",
"copy-webpack-plugin": "^3.0.1",
"enzyme": "^2.5.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-typescript": "^2.1.2",
"karma-webpack": "^1.8.0",
"react-addons-test-utils": "^15.3.2",
"source-map-loader": "^0.1.5",
"ts-loader": "^0.9.4",
"tslint-eslint-rules": "^2.1.0",
"typescript": "^2.0.8",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.2"
},
答案 0 :(得分:1)
有趣的是,我以前见过这样的问题,这就是我解决的问题。 "安装browser-resolve"与
npm install browser-resolve
并且遇到与模块/依赖项相关的错误,请在系统范围内使用此工具为所有节点项目安装缺少的依赖项
npm install -g npm-install-missing
或使用特定项目目录
npm-install-missing