Node.js Angular4应用程序,npm安装提供';$不被识别为内部或外部命令';错误
我有一个Angular4应用程序,它使用一个名为“ngular2 google map auto complete”的包 它以前工作过,但在离开它几个月后,我正在收集代码库 我的问题是,当我运行“npm安装”时,我得到以下控制台错误Node.js Angular4应用程序,npm安装提供';$不被识别为内部或外部命令';错误,node.js,angular,npm,Node.js,Angular,Npm,我有一个Angular4应用程序,它使用一个名为“ngular2 google map auto complete”的包 它以前工作过,但在离开它几个月后,我正在收集代码库 我的问题是,当我运行“npm安装”时,我得到以下控制台错误 angular2-google-map-auto-complete@2.0.7 postinstall C...\node_modules\angular2-google-map-a uto-complete $(npm bin)/typings install '
angular2-google-map-auto-complete@2.0.7 postinstall C...\node_modules\angular2-google-map-a
uto-complete
$(npm bin)/typings install
'$' is not recognized as an internal or external command,
operable program or batch file.
我怀疑这与已安装的打字机有关,但不确定如何修复它。
有人有什么想法吗
我的包文件看起来像这样
{
"name": "tilecase",
"version": "1.0.0",
"description": "TileCase",
"scripts": {
"start": "webpack-dev-server --config config/webpack.dev.js --inline --progress --content-base src/",
"test": "karma start",
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"
},
"repository": {
"type": "git",
"url": "git://github.com/bencameron00/TileCase.V2.UI.git"
},
"license": "UNLICENSED",
"dependencies": {
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^4.3.6",
"": "^3.26.1",
"": "^3.2.12",
"angular2-google-map-auto-complete": "^2.0.7",
"angular2-google-maps": "^0.15.0",
"angular2-infinite-scroll": "^0.2.9",
"angular2-jwt": "^0.1.28",
"angular2-moment": "^0.8.2",
"angulartics2": "^1.6.3",
"core-js": "^2.4.1",
"googlemaps": "^1.12.0",
"html-webpack-plugin": "^2.26.0",
"jquery": "^3.1.1",
"karma-webpack": "^1.8.1",
"ng2-bootstrap": "^1.2.6",
"ng2-facebook-sdk": "^1.2.0",
"ng2-file-upload": "^1.2.0",
"ng2-img-cropper": "^0.7.7",
"ng2-page-scroll": "^3.2.3",
"ng2-social-share": "^0.0.10",
"reflect-metadata": "^0.1.9",
"rxjs": "^5.0.3",
"signalr": "^2.2.1",
"zone.js": "^0.6.26"
},
"devDependencies": {
"": "^3.25.37",
"": "^3.2.12",
"angular2-jwt": "^0.1.24",
"css-loader": "^0.23.1",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.15.0",
"jasmine-core": "^2.4.1",
"karma": "^0.13.22",
"karma-jasmine": "^0.3.8",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"ng2-facebook-sdk": "^1.1.0",
"node-sass": "^3.8.0",
"null-loader": "^0.1.1",
"phantomjs-prebuilt": "^2.1.7",
"raw-loader": "^0.5.1",
"rimraf": "^2.5.2",
"sass-loader": "^3.2.1",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"typescript": "^2.2 ",
"typings": "^2.1.1",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",
"webpack-merge": "^0.14.0",
"webpack-svgstore-plugin": "^3.0.0"
}
}
输入已被更改,您需要更新package.json。干杯好的,酷,我需要做什么更新?例如,你应该查看你的typings.json文件,你在那里有什么依赖关系,基于此,你可以看到是否有相应的type def文件可用,然后添加为dev依赖关系,关于如何搜索的详细说明可以在我在上一条评论中添加的链接中找到,谢谢!!可能是因为您在命令中使用了“$”吗?当您从联机引用复制并粘贴命令时,会发生这种情况。类似于“$(node bin)/npm install”,这意味着它是一个命令,$只是一个指示,而不是命令的一部分。@MadhuRanjan我只在Windows机器上发现了这个问题。Mac和Linux运行良好。如果输入错误,则需要更新package.json。干杯好的,酷,我需要做什么更新?例如,你应该查看你的typings.json文件,你在那里有什么依赖关系,基于此,你可以看到是否有相应的type def文件可用,然后添加为dev依赖关系,关于如何搜索的详细说明可以在我在上一条评论中添加的链接中找到,谢谢!!可能是因为您在命令中使用了“$”吗?当您从联机引用复制并粘贴命令时,会发生这种情况。类似于“$(node bin)/npm install”,这意味着它是一个命令,$只是一个指示,而不是命令的一部分。@MadhuRanjan我只在Windows机器上发现了这个问题。Mac和Linux运行良好。