2016-04-12 23 views
1

Merhaba npm kurulumunda bir sorunum var: Kaldırmayı ve yeniden yüklemeyi deniyorum, ancak tüm klasörleri kaldırmaya çalışıyorum.Bunu npm yüklemesinde nasıl düzeltirim: (npm ERR! Install Bağımlılıklar okunamadı)?

> [email protected]:~$ npm install 
> npm ERR! install Couldn't read dependencies 
> npm ERR! Linux 4.2.0-35-generic 
> npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" 
> npm ERR! node v4.4.2 
> npm ERR! npm v2.15.0 
> npm ERR! file /home/lucas/package.json 
> npm ERR! code EJSONPARSE 

> npm ERR! Failed to parse json 
> npm ERR! Unexpected token ':' at 1:17 
> npm ERR! "dependencies": { 
> npm ERR!    ^
> npm ERR! File: /home/lucas/package.json 
> npm ERR! Failed to parse package.json data. 
> npm ERR! package.json must be actual JSON, not just JavaScript. 
> npm ERR! 
> npm ERR! This is not a bug in npm. 
> npm ERR! Tell the package author to fix their package.json file. JSON.parse 

> npm ERR! Please include the following file with any support request: 
> npm ERR!  /home/lucas/npm-debug.log 
+1

Bu paket.json dosyanızın JSON değil gibi görünüyor. Tam dosyayı verebilir misiniz? – Komo

cevap

0

kadar ne UÖM'nin söylüyorum size:

> npm ERR! File: /home/lucas/package.json 
> npm ERR! Failed to parse package.json data. 
> npm ERR! package.json must be actual JSON, not just JavaScript. 
> npm ERR! 
> npm ERR! This is not a bug in npm. 
> npm ERR! Tell the package author to fix their package.json file. JSON.parse 

JSON dosyası geçerli olduğundan emin olun. on JSONLint'u kontrol edebilirsiniz. Bağımlılıklar bölümü nasıl görünmelidir. Çevredeki nesne braketlerine dikkat edin.

{ "dependencies" : 
    { "foo" : "1.0.0 - 2.9999.9999" 
    , "bar" : ">=1.0.2 <2.1.2" 
    , "baz" : ">1.0.2 <=2.3.4" 
    , "boo" : "2.0.1" 
    , "qux" : "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0" 
    , "asd" : "http://asdf.com/asdf.tar.gz" 
    , "til" : "~1.2" 
    , "elf" : "~1.2.3" 
    , "two" : "2.x" 
    , "thr" : "3.3.x" 
    , "lat" : "latest" 
    , "dyl" : "file:../dyl" 
    } 
} 

UÖM'nin belgelerin "bağımlılıkları" bölümünde yaklaşık See this writeup ve package.json senin bölüm özellikle gelen herhangi karakterler "bağımlılıkları" önce benzer emin olun.