我有一个工作正常的项目,我在想我运行了一个更新,并且导致了我正在经历的错误。
$ ng serve
** Angular Live Development Server is listening on localhost:4200, open
your browser on http://localhost:4200/ **
Date: 2018-09-13T00:04:59.389Z
Hash: dd4fca7dc10f51a75e42
Time: 22214ms
chunk {children-children-module} children-children-module.js, children-children-module.js.map (children-children-module) 99.1 kB [rendered]
chunk {children-children-module~home-home-module~ucp-list-v1-list-module~ucp-ucp-module} children-children-module~home-home-module~ucp-list-v1-list-module~ucp-ucp-module.js, children-children-module~home-home-module~ucp-list-v1-list-module~ucp-ucp-module.js.map (children-children-module~home-home-module~ucp-list-v1-list-module~ucp-ucp-module) 171 kB [rendered]
chunk {error-error-module} error-error-module.js, error-error-module.js.map (error-error-module) 15.6 kB [rendered]
chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 7.67 kB [rendered]
chunk {main} main.js, main.js.map (main) 83.7 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 415 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 8.4 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 778 kB [rendered]
chunk {session-session-module} session-session-module.js, session-session-module.js.map (session-session-module) 29.1 kB [rendered]
chunk {styles} styles.js, styles.js.map (styles) 819 kB [initial] [rendered]
chunk {ucp-list-v1-list-module} ucp-list-v1-list-module.js, ucp-list-v1-list-module.js.map (ucp-list-v1-list-module) 7.69 kB [rendered]
chunk {ucp-ucp-module} ucp-ucp-module.js, ucp-ucp-module.js.map (ucp-ucp-module) 7.57 kB [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 8.84 MB [initial] [rendered]
WARNING in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) postcss-url: /Users/user123/Angular/Project123/src/assets/scss/components/_wheather.scss:2:4: Can't read file '/Users/user123/Angular/Project123/src/assets/img/wheather.jpg', ignoring
WARNING in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) postcss-url: /Users/user123/Angular/Project123/src/assets/scss/utilities/_base.scss:262:4: Can't read file '/Users/user123/Angular/Project123/src/assets/img/6.jpg', ignoring
WARNING in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) postcss-url: /Users/user123/Angular/Project123/src/assets/scss/utilities/_base.scss:267:4: Can't read file '/Users/user123/Angular/Project123/src/assets/img/7.jpg', ignoring
ERROR in ./src/assets/climacon/climacon-font/styles.css (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/assets/climacon/climacon-font/styles.css)
(Emitted value instead of an instance of Error) CssSyntaxError: /Users/user123/Angular/Project123/src/assets/climacon/climacon-font/styles.css:5:8: Can't resolve 'climacons-webfont.svg' in '/Users/user123/Angular/Project123/src/assets/climacon/climacon-font'
3 | src:url('climacons-webfont.eot');
4 | src:url('climacons-webfont.eot?#iefix') format('embedded-opentype'),
> 5 | url('climacons-webfont.svg#Climacons-Font') format('svg'),
| ^
6 | url('climacons-webfont.woff') format('woff'),
7 | url('climacons-webfont.ttf') format('truetype');
ERROR in ./src/assets/glyphicons/glyphicons.css (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/assets/glyphicons/glyphicons.css)
(Emitted value instead of an instance of Error) CssSyntaxError: /Users/user123/Angular/Project123/src/assets/glyphicons/glyphicons.css:5:289: Can't resolve 'fonts/glyphicons-halflings-regular.svg' in '/Users/user123/Angular/Project123/src/assets/glyphicons'
3 |
4 | src: url('fonts/glyphicons-halflings-regular.eot');
> 5 | src: url('fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('fonts/glyphicons-halflings-regular.woff') format('woff'), url('fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
| ^
6 | }
7 | .glyphicon {
ERROR in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) CssSyntaxError: /Users/user123/Angular/Project123/src/assets/scss/components/_wheather.scss:2:16: Can't resolve '../img/wheather.jpg' in '/Users/user123/Angular/Project123/src/assets/scss'
1 | .wheather-widget {
> 2 | background: url(../img/wheather.jpg);
| ^
3 | background-repeat: no-repeat;
4 | background-size: cover;
ERROR in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) CssSyntaxError: /Users/user123/Angular/Project123/src/assets/scss/utilities/_base.scss:262:16: Can't resolve '../img/6.jpg' in '/Users/user123/Angular/Project123/src/assets/scss'
260 |
261 | .form-bg {
> 262 | background: url(../img/6.jpg);
| ^
263 | background-size: cover;
264 | }
ERROR in ./src/assets/scss/style.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
(Emitted value instead of an instance of Error) CssSyntaxError: /Users/user123/Angular/Project123/src/assets/scss/utilities/_base.scss:267:16: Can't resolve '../img/7.jpg' in '/Users/user123/Angular/Project123/src/assets/scss'
265 |
266 | .error-bg {
> 267 | background: url(../img/7.jpg);
| ^
268 | background-size: cover;
269 | height: 100vh;
ℹ 「wdm」: Failed to compile.
我什至不知道从哪里开始调试它。我使用的是购买的种子项目模板,因此可能是由于那里使用的依赖项引起的,但是我不确定这是库问题还是环境问题?
答案 0 :(得分:0)
请尝试删除所有不存在的图像和SVG文件的依赖关系,或指向不存在的目录(尤其是.css
或.scss
文件(尤其是styles.scss
文件中的目录)