试用WSK,我只是按照谷歌开发网站上的说明操作,这是我在$ gulp或$ gulp服务后的错误:
/folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:46
msg = msg.replace(new RegExp(path + '/?', 'g'), '');
^
SyntaxError: Invalid regular expression: //var/folders/F9/F9lleWHkHiiltRH5iZcuLk+++TI/-Tmp-/gulp-ruby-sass/?/: Nothing to repeat
at new RegExp (<anonymous>)
at /folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:46:21
at Array.forEach (native)
at removePaths (/folderpath/web-starter-kit-master/node_modules/gulp-ruby-sass/index.js:45:8)
at Socket.<anonymous> (/folderpath/web-starter-kit-master/node_modules /gulp-ruby-sass/index.js:118:14)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
答案 0 :(得分:4)
刚刚遇到这个(今晚第一次设置WSK)。
看起来这是gulp-ruby-sass实际修复的错误: https://github.com/rjm101/gulp-ruby-sass/commit/789d45f9b076781db652448a472357064a0f3e41
无论出于什么原因,WSK在其node_modules目录中还没有它。
我只需在本地手动编辑web-starter-kit-master / node_modules / gulp-ruby-sass / index.js并进行上述链接更改即可使用。我确信有更合适的方法可以解决这个问题,但现在已经很晚了,而且我正在失去耐心:)