小编Riy*_*dar的帖子

错误:找不到模块“vue-loader-v16/package.json”

我是 vue.js 的新手,刚从 react.js 过来。我在 vue 加载器中面临的问题一开始并没有发生。但是从第二次启动服务器时应用程序崩溃。

 npm run serve

> todo@0.1.0 serve /home/riyad/Desktop/todo_wedevs/todo
> vue-cli-service serve

 INFO  Starting development server...
 ERROR  Error: Cannot find module 'vue-loader-v16/package.json'
Error: Cannot find module 'vue-loader-v16/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15)
    at Function.Module._load (internal/modules/cjs/loader.js:539:25)
    at Module.require (internal/modules/cjs/loader.js:667:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at api.chainWebpack.webpackConfig (/home/riyad/Desktop/todo_wedevs/todo/node_modules/@vue/cli-service/lib/config/base.js:114:23)
    at webpackChainFns.forEach.fn (/home/riyad/Desktop/todo_wedevs/todo/node_modules/@vue/cli-service/lib/Service.js:236:40)
    at Array.forEach (<anonymous>)
    at Service.resolveChainableWebpackConfig (/home/riyad/Desktop/todo_wedevs/todo/node_modules/@vue/cli-service/lib/Service.js:236:26)
    at Service.resolveWebpackConfig (/home/riyad/Desktop/todo_wedevs/todo/node_modules/@vue/cli-service/lib/Service.js:240:48)
    at PluginAPI.resolveWebpackConfig (/home/riyad/Desktop/todo_wedevs/todo/node_modules/@vue/cli-service/lib/PluginAPI.js:132:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todo@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js vue-router vue-loader vuex

26
推荐指数
3
解决办法
2万
查看次数

如何让 django celery 使用 redis 代理 url?

(venv) [riyad@Fury django_celery]$ celery -A django_celery worker -l info
<Celery django_celery at 0x7f0917d57fa0>
 
 -------------- celery@Fury v4.3.0 (rhubarb)
---- **** ----- 
--- * ***  * -- Linux-5.8.6-1-MANJARO-x86_64-with-glibc2.2.5 2020-09-30 02:54:36
-- * - **** --- 
- ** ---------- [config]
- ** ---------- .> app:         django_celery:0x7f0917d57fa0
- ** ---------- .> transport:   amqp://guest:**@localhost:5672//
- ** ---------- .> results:     
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** …
Run Code Online (Sandbox Code Playgroud)

django redis celery

6
推荐指数
2
解决办法
1万
查看次数

Flutter:无法加载资源文件“car.png”

我已将资源文件添加到项目根目录中,其中包含图像、字体和声音。

\n

资产文件夹

\n

在 pubspec.yml 文件中添加资产,如下所示:

\n
flutter:\n\n  uses-material-design: true\n\n  assets:\n    - assets/images/\n
Run Code Online (Sandbox Code Playgroud)\n

然后我尝试通过 Image.asset 添加图像,如下代码:

\n
Scaffold(\n      appBar: AppBar(\n        leading: Align(\n          alignment: Alignment.centerRight,\n          child: Text(\n            "Uber",\n            style: TextStyle(\n              fontSize: 22.0,\n              fontWeight: FontWeight.w400\n            ),\n          )\n        ),\n      ),\n      body: Column(\n        children: [\n          Text(\n            "riyad", \n            style: TextStyle(color: Colors.black),\n          ),\n          Image.asset("car_android.png") <-- this like \n        ],\n      ),\n    );\n
Run Code Online (Sandbox Code Playgroud)\n

但它显示了无法加载资产的异常:

\n
\n

解析图像编解码器时抛出以下断言:\n无法加载资源:car_android.png”

\n
\n

我的回溯异常:

\n
\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90 Exception caught by image resource service \xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\nThe following assertion was thrown resolving an …
Run Code Online (Sandbox Code Playgroud)

dart flutter

4
推荐指数
1
解决办法
1万
查看次数

React Hook "useReducer" 在函数 "fetchData" 中调用,它既不是 React 函数组件,也不是自定义 React Hook 函数

我正在尝试使用从 fetchData 钩子中获取数据,但奇怪的是它产生了以下错误->

  Line 26:31:  React Hook "useReducer" is called in function "fetchData" which is neither a React function component or a custom React Hook function  react-hooks/rules-of-hooks
  Line 28:5:   React Hook "useEffect" is called in function "fetchData" which is neither a React function component or a custom React Hook function   react-hooks/rules-of-hooks
Run Code Online (Sandbox Code Playgroud)

我的 fetchData.js 文件代码 ->

import { useReducer, useEffect } from "react"
import axios from 'axios'

const ACTION = {
    MAKE_REQUEST: 'make_request',
    GET_DATA: 'get_data',
    ERROR: 'error'
}

const BASE_URL = …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs

1
推荐指数
1
解决办法
677
查看次数

标签 统计

javascript ×2

celery ×1

dart ×1

django ×1

flutter ×1

reactjs ×1

redis ×1

vue-loader ×1

vue-router ×1

vue.js ×1

vuex ×1