Module build failed: Error: No parser and no file path given, couldn't infer a parser.
at normalize (/home/nayan/dd_pwa/node_modules/prettier/index.js:7051:13)
at formatWithCursor (/home/nayan/dd_pwa/node_modules/prettier/index.js:10370:12)
at /home/nayan/dd_pwa/node_modules/prettier/index.js:31115:15
at Object.format (/home/nayan/dd_pwa/node_modules/prettier/index.js:31134:12)
at Object.module.exports (/home/nayan/dd_pwa/node_modules/vue-loader/lib/template-compiler/index.js:80:23)
@ ./layouts/error.vue 7:0-368
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?name=client&reload=true&timeout=30000&path=/__webpack_hmr ./.nuxt/client.js
Run Code Online (Sandbox Code Playgroud)
我在Nuxtjs上遇到了同样的问题.任何面临同样问题的人 救命?!!版本:"nuxt":"^ 1.0.0","更漂亮":"^ 1.12.1"
尝试了降级和升级更漂亮版本的所有选项.
我们使用 Nuxtjs 2.3.4 和 VuetifyJS 1.2.10。
每个页面上都有很多来自 VuetifyJs 的未使用的 CSS 和 js。
如何从每个页面中删除不需要的 VuetifyJs css/js?
谁能帮忙!!
我正在升级到Nuxt 2.4.5并遇到以下错误
TypeError: Cannot add module namespace property '_nuxtConfigFile' to nuxt.config.js
我在代理中使用Nuxt-axios模块。
对于错误处理,我在
插件/axios.js
export default function({ $axios, __isRetryRequest, store, app, redirect , payload , next}) {
$axios.onRequest(config => {
if (app.$cookies.get('at') && app.$cookies.get('rt') && config.url != '/post_login/') {
config.headers.common['Authorization'] = `Bearer ${app.$cookies.get('at')}`;
}
});
$axios.onResponseError(err => {
const code = parseInt(err.response && err.response.status)
let originalRequest = err.config;
if (code === 401) {
originalRequest.__isRetryRequest = true;
store
.dispatch('LOGIN', { grant_type: 'refresh_token', refresh_token: app.$cookies.get('rt')})
.then(res => {
originalRequest.headers['Authorization'] = 'Bearer ' + app.$cookies.get('at');
return app.$axios(originalRequest);
})
.catch(error => {
console.log(error); …Run Code Online (Sandbox Code Playgroud)