django,reactjs构建web错误记录
来源:互联网 发布:青云志数据库 编辑:程序博客网 时间:2024/06/01 08:19
一.新建项目:
1. 在Mac本上安装pychram地址:https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=mac
2.在pycharm中新建一个项目,由于是免费版本新建项目时不会有框架选择
3.新建完项目后,用命令终端进入项目目录,使用命令
新建工程:django-admin.py startproject myapp
新建工程下的项目:python manage.py startapp app_name
4.配置运行参数
5.在app_name 目录下新建templates文件夹。
6.在5步骤的templates文件夹中点击命令:create-react-app my-app 创建react工程
7.配置Django项目中使用react作为前端页面
1.错误一
Mac用户信息和目录$ webpackHash: 7badbf69a9105126efc0Version: webpack 1.15.0Time: 1192ms Asset Size Chunks Chunk Nameshot-bundle.js 199 kB 0, 1 [emitted] hot commonV3.js 6.03 kB 1 [emitted] commonV3.js + 12 hidden modulesERROR in ./entry/aaa.jsModule build failed: ReferenceError: Unknown plugin "import" specified in "/Users/dawn/HelloWorld/static/.babelrc" at 0, attempted to resolve relative to "/Users/dawn/HelloWorld/static" at /Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17 at Array.map (native) at Function.normalisePlugins (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at OptionManager.init (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) at File.initOptions (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/index.js:212:65) at new File (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/file/index.js:135:24) at Pipeline.transform (/Users/dawn/HelloWorld/static/node_modules/babel-core/lib/transformation/pipeline.js:46:16) at transpile (/Users/dawn/HelloWorld/static/node_modules/babel-loader/lib/index.js:46:20) at Object.module.exports (/Users/dawn/HelloWorld/static/node_modules/babel-loader/lib/index.js:163:20)
解决方法:
Mac用户信息和目录$ npm install babel-plugin-import
0 0
- django,reactjs构建web错误记录
- web 框架 Django 学习记录
- android工程构建错误记录
- ReactJs的一些记录
- django学习记录-控制表单错误
- 构建版本上传 itunes connect 错误记录
- 基于Python Django技术构建web系统实践
- 在 Django 中构建 Oracle 数据库支持的 Web 应用程序
- (记录向)reactjs学习记录
- 从零开始构建前端和reactjs - 0
- 从0使用webpack构建reactjs
- django-haystack & solr 使用过程中的错误记录。。。
- 阿里云 django的一次web维护记录
- web 框架 Django 学习记录 (三)一个实例
- reactjs
- ReactJS
- ReactJS
- Reactjs
- Android第三方接入 Udesk
- 带进度条的文件上传jquery
- little kernel分析 [LK]
- GC 算法与种类,
- 安卓上面遇见的坑
- django,reactjs构建web错误记录
- 数据库SQL优化大总结之 百万级数据库优化方案
- Grails中的Services
- PO BO VO DTO POJO DAO DO这些在Java中的概念
- Two Sum
- JavaScript的性能优化:加载和执行
- (2)设计模式之工厂方法模式(创建型模式)
- linux下vlan的实现分析(上)
- 移动前端开发之viewport的深入理解