當我試圖啓動gulp serve
它引發錯誤錯誤:無法找到模塊「瀏覽器同步」
module.js:338 throw err; ^
Error: Cannot find module 'browser-sync'
at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (/home/sajad/p_projects/my-project/gulpfile.js:17:19) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17)
後,我試圖sudo npm rm browser-sync && npm install browser-sync
向上升follwing錯誤
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "browser-sync" npm ERR! node v0.12.7 npm ERR! npm v2.11.3 npm ERR! file /home/sajad/.npm/escape-html/1.0.2/package/package.json npm ERR! code EJSONPARSE
npm ERR! Failed to parse json npm ERR! No data, empty input at 1:1 npm ERR! npm ERR!^npm ERR! File: /home/sajad/.npm/escape-html/1.0.2/package/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/sajad/p_projects/my-project/npm-debug.log
指引我如何開始gulp serve
以及如何解決這些錯誤
是我使用代理 –
但我停我的代理 - 我重新安裝了,但同樣的問題 –