我正在学习React.js,我正在使用Windows 8 OS.i已导航到我的根文件夹
1.Created the package.json file by npm init
2. install webpack by npm install -S webpack.now webpack has been downloaded to my modules folder
3. install webpack globally by typing npm install webpack -g
4. i am also having a webpack.config.js in my root folder which contains the source and ouput directory
5. when i type the webpack command i am getting the below error.
Run Code Online (Sandbox Code Playgroud)
webpack不被识别为内部或外部命令,可操作程序或批处理文件
我已经在新机器上安装了最新的angular-cli,我正在尝试使用之前的cli版本生成一个项目
我得到了这个警告
Your global Angular CLI version (1.6.4) is greater than your local
version (1.6.3). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
Run Code Online (Sandbox Code Playgroud)
虽然该项目正常工作,我有什么办法,以更新我的项目与最新的dependecies,并避免这个消息(避免不抑制!)
这是我的package.json
{
"name": "AngularTest",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --port 4200",
"hmr": "ng serve --host 0.0.0.0 --port 4200 4201 --hmr -e=hmr",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": { …Run Code Online (Sandbox Code Playgroud) 我注意到我安装了本地和全局 Angular/cli 软件包。
与全局包相比,何时使用 Angular/cli 本地包?
我正在尝试将角度更新为最新版本.
我更新了global @ angular/cli
npm install -g @angular/cli
Run Code Online (Sandbox Code Playgroud)
然后,当我尝试更新local @ angular/cli时,ng update @angular/cli我收到此错误:
Error: Unexpected end of JSON input
Unexpected end of JSON input
Run Code Online (Sandbox Code Playgroud)
这是我的package.json
{
"name": "apimap",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.11",
"@angular/cdk": "^5.2.5",
"@angular/common": "^5.2.11",
"@angular/compiler": "^5.2.11",
"@angular/core": "^5.2.11",
"@angular/flex-layout": "^2.0.0-rc.1",
"@angular/forms": "^5.2.11",
"@angular/http": "^5.2.11",
"@angular/material": "^5.2.5",
"@angular/platform-browser": "^5.2.11",
"@angular/platform-browser-dynamic": "^5.2.11", …Run Code Online (Sandbox Code Playgroud)