Nuxt.js: 404 ResourceNotFound (ttf, woff, svg)

Created on 21 Feb 2018  路  4Comments  路  Source: nuxt/nuxt.js

I'm using ElemeFE/Element, I set it up in a plugin as follow:

import Vue from 'vue';
import ElementUI from 'element-ui';
import lang from 'element-ui/lib/locale/lang/en';
import locale from 'element-ui/lib/locale';
import '../theme/index.css';

locale.use(lang);
Vue.use(ElementUI);

I receive network errors:
image

With console errors:
GET http://localhost:3000/_nuxt/fonts%0Element-icons.6f0a763.ttf net::ERR_ABORTED

Currently under Nuxt v1.3.0
I think the error might come from nuxt webpack config.


File _nuxt/vendor.js contains:

/***/ "./node_modules/element-ui/lib/theme-chalk/fonts/element-icons.ttf":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__.p + "fonts\\element-icons.6f0a763.ttf";

/***/ }),

File _nuxt/app.js contains:

/***/ "./theme/fonts/element-icons.ttf?t=1510834658947":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__.p + "fonts\\element-icons.6f0a763.ttf";

/***/ }),

Does the problem come from \\e that turns into %0E?

This question is available on Nuxt.js community (#c2493)
help-wanted

Most helpful comment

ok odd, clearing out node_modules build .nuxt package-lock.json and re-installing (npm i) using git-cmd seems to have fixed the issues for me. No idea how that could of fixed things.

All 4 comments

+1 same issue, windows system, importing font awesome fonts, the scss renders to
```
@font-face {
font-family: 'FontAwesome';
src: url(/_nuxt/fonts\fontawesome-webfont.674f50d.eot);
src: url(/_nuxt/fonts\fontawesome-webfont.674f50d.eot?#iefix&v=4.7.0) format("embedded-opentype"), url(/_nuxt/fonts\fontawesome-webfont.af7ae50.woff2) format("woff2"), url(/_nuxt/fonts\fontawesome-webfont.fee66e7.woff) format("woff"), url(/_nuxt/fonts\fontawesome-webfont.b06871f.ttf) format("truetype"), url(/_nuxt/img\fontawesome-webfont.912ec66.svg#fontawesomeregular) format("svg");
font-weight: normal;
font-style: normal; }

ok odd, clearing out node_modules build .nuxt package-lock.json and re-installing (npm i) using git-cmd seems to have fixed the issues for me. No idea how that could of fixed things.

Something related: ElemeFE/element/issues/9086

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredreich picture jaredreich  路  3Comments

bimohxh picture bimohxh  路  3Comments

pehbehbeh picture pehbehbeh  路  3Comments

vadimsg picture vadimsg  路  3Comments

mattdharmon picture mattdharmon  路  3Comments