我在进行构建时遇到以下错误。事情是它在我的其他机器上工作..这表明我的npm / gulp配置问题,而不是代码库:
[10:54:27] Error: Error: File not found with singular glob: /Users/me/git/Project/app/bower_components/angular-material/angular-material.css
at DestroyableTransform.<anonymous> (/Users/me/git/Project/node_modules/gulp-useref/index.js:65:28)
at emitOne (events.js:120:20)
at DestroyableTransform.emit (events.js:210:7)
at emitOne (events.js:120:20)
at Through2.emit (events.js:210:7)
at OrderedStreams.<anonymous> (/Users/me/git/Project/node_modules/gulp-useref/node_modules/glob-stream/index.js:140:20)
运行npm version
给了我:
{ h54s_angular_seed: '0.1.1',
npm: '5.3.0',
ares: '1.10.1-DEV',
cldr: '31.0.1',
http_parser: '2.7.0',
icu: '59.1',
modules: '57',
nghttp2: '1.22.0',
node: '8.4.0',
openssl: '1.0.2l',
tz: '2017b',
unicode: '9.0',
uv: '1.13.1',
v8: '6.0.286.52',
zlib: '1.2.11' }
正在运行gulp -v
:
[11:01:07] CLI version 3.9.1
[11:01:07] Local version 3.9.1
使用OSX。我该如何调试?
答案 0 :(得分:0)
我没有安装凉亭!解决方法是简单地运行<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$('.version_switcher_placeholder > select').on('change', function() {
//code here
});
});
</script>
(这是在根据建议here重新安装npm之后)。