小编jec*_*918的帖子

webpack-bundle-tracker 没有创建 webpack-stats.json?

我正在尝试按照本文所述将 Vue 和 Django 结合使用。除了 webpack-bundle-tracker 之外,一切似乎都在工作。我很确定 webpack-bundle-tracker 甚至没有安装,因为当我运行时会发生这种情况yarn add webpack-bundle-tracker --dev

yarn add v1.22.4
info No lockfile found.
[1/4]   Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/core-js: self signed certificate in certificate chain".
Run Code Online (Sandbox Code Playgroud)

但是,当我运行npm install --save-dev webpack-bundle-tracker它似乎工作?但没有任何改变,也没有生成 webpack-stats.json 文件。

另一件事可能是 django-webpack-loader,因为当我运行时pip install django-webpack-loader会发出一堆权限错误,但是当我运行pip install django-webpack-loader --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org.

当我尝试打开我的 vue/django 测试页面时 django 给我的错误:

Error reading /Users/$ME/Dev/digiproj/vue_frontend/webpack-stats.json. Are you sure webpack has generated the file and the …
Run Code Online (Sandbox Code Playgroud)

python django node.js webpack vue.js

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

如何检查 Django Queryset 是否返回多个对象?

基本上我希望这是一个简单的问题,我只想检查查询集是否包含多个对象,但我不知道该怎么做?我写的(不起作用)如下。

{% if game.developer.all > 1 %} 
   <h1>Developers:</h1>
{% else %} 
   <h1>Developer:</h1>
{% endif %}
Run Code Online (Sandbox Code Playgroud)

html python django

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

无法安装 Vue CLI?(苹果系统)

嘿,所以我尝试通过 npm ( sudo npm install -g @vue/cli) 安装 Vue,但我只是收到一堆警告和错误,我无法真正理解它,也不知道为什么会发生......

npm WARN deprecated request@2.88.2: request has been deprecated, see [`https://github.com/request/request/issues/3142`](https://github.com/request/request/issues/3142)
npm WARN deprecated resolve-url@0.2.1: [`https://github.com/lydell/resolve-url#deprecated`](https://github.com/lydell/resolve-url#deprecated)
npm WARN deprecated urix@0.1.0: Please see [`https://github.com/lydell/urix#deprecated`](https://github.com/lydell/urix#deprecated)
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

/usr/local/bin/vue -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js
> fsevents@1.2.13 install /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents` …
Run Code Online (Sandbox Code Playgroud)

terminal node.js npm vue.js vuejs2

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

标签 统计

django ×2

node.js ×2

python ×2

vue.js ×2

html ×1

npm ×1

terminal ×1

vuejs2 ×1

webpack ×1