【发布时间】:2019-03-21 10:25:08
【问题描述】:
我正在使用有关如何使用Django Rest - React and it has some testing in it too 的教程。当我测试它时,错误来了:
CypressError: cy.exec('npm run dev') timed out after waiting 60000ms.
因为这个错误发生在“before all”钩子中,我们跳过了当前套件中的剩余测试:“Django REST framework / Rea...”
下面是package.json的一部分,
{
"name": "django-drf-react-quickstart",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"flush": "pipenv run python ./project/manage.py flush --no-input",
"e2e": "cypress open --project ./project/frontend/",
"dev": "webpack --mode development ./project/frontend/src/index.js --output ./project/frontend/static/frontend/main.js",
"build": "webpack --mode production ./project/frontend/src/index.js --output ./project/frontend/static/frontend/main.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
我认为问题出在同花顺部分。我使用 virtualenv 并且尝试了许多组合,例如:
运行 python ./project/manage.py flush --no-input
virtualenv 运行 python ./project/manage.py flush --no-input
- python ./project/manage.py flush --no-input
我什至尝试安装 pipenv,但没有用。请帮我解决这个问题。
【问题讨论】:
标签: python django virtualenv pipenv