I have a little trouble trying connect with browser sync.
At the biginning I tried to run task by
gulp browser-sync
but i got error: `C:\Users\Logist\OneDrive\Programming\Myproject>gulp browser-sync module.js:472
throw err;
^
Error: Cannot find module 'browser-sync'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\Logist\OneDrive\Programming\Myproject\gulpfi le.js:3:16)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
`
Despite the fact that the browser had been installed before the moment. Then I read the solution here and wrote
npm i browser-sync --save
So got that:
`C:\Users\Logist\OneDrive\Programming\Myproject>npm i browser-sync --save
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "i" "browser-sync" "--save"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: browser-sync@0.0.1-security
npm ERR! notarget Valid install targets:
npm ERR! notarget 0.1.0, 0.1.1, 0.1.3, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10 , 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.3.2 etc
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.
npm ERR! Please include the following file with any support request: npm ERR! C:\Users\Logist\AppData\Roaming\npm-cache_logs\2017-05-31T12_44_16 _592Z-debug.log`
I checked the .json and saw that
" "author": "Sanek",
"license": "ISC",
"devDependencies": {
"browser-sync": "0.0.1-security",
"gulp": "^3.9.1",
"gulp-sass": "^3.1.0" ".
Btw as you may have noticed my project is stored in OneDrive
I'm sorry for so long topic, it's my first one.
via Alexander Mashchenko
No comments:
Post a Comment