我一直在按照本教程操作strapi
https://strapi.io/blog/building-a-static-website-using-gatsby-and-strapi但是,当我安装时,我安装的是alpha
而不是beta
我正在尝试升级到beta
,所以我按照此处的说明进行操作
https://strapi.io/documentation/3.0.0-beta.x/migration-guide/migration-guide-alpha.26-to-beta.html
我按照说明进行了更改,修改了package.json
,然后运行了npm i
,这给了我一个notarget No matching version found for [email protected].
的错误
然后代替文档中提到的更改与alpha
相关的所有beta.x
"strapi": "3.0.0-alpha.26.2"
->"strapi": "3.0.0-beta.x"
我做了"strapi": "^3.0.0-beta.17.5"
这使命令npm i
成功运行,因此我继续执行说明。完成后,我尝试运行strapi develop
,但收到error Error: Missing extensions folder. Please create one in your app root directory
错误,因此我手动将文件添加到名为extensions
的文件夹中,然后尝试启动strapi develop
,但随后出现error Error: Cannot find module 'strapi-hook-bookshelf/lib/utils/'
]错误
我尝试删除项目中的node_modules
干净npm缓存以及.cache
文件夹,但这些都不起作用。
这里是完整的修改后的package.json
{ "name": "cms", "private": true, "version": "0.1.0", "description": "A Strapi application.", "main": "./server.js", "scripts": { "develop": "strapi develop", "start": "strapi start", "build": "strapi build", "strapi": "strapi", "lint": "node_modules/.bin/eslint api/**/*.js config/**/*.js plugins/**/*.js" }, "devDependencies": { "babel-eslint": "^7.1.1", "eslint": "^4.19.1", "eslint-config-airbnb": "^13.0.0", "eslint-plugin-import": "^2.11.0", "eslint-plugin-react": "^7.7.0" }, "dependencies": { "axios": "^0.19.0", "knex": "latest", "lodash": "^4.17.5", "pg": "^7.13.0", "sqlite3": "latest", "strapi": "^3.0.0-beta.17.5", "strapi-admin": "^3.0.0-beta.17.5", "strapi-email-nodemailer": "^0.2.1", "strapi-hook-bookshelf": "^3.0.0-beta.17.5", "strapi-hook-knex": "^3.0.0-beta.17.5", "strapi-plugin-content-manager": "^3.0.0-beta.17.5", "strapi-plugin-content-type-builder": "^3.0.0-beta.17.5", "strapi-plugin-email": "^3.0.0-beta.17.5", "strapi-plugin-upload": "^3.0.0-beta.17.5", "strapi-plugin-users-permissions": "^3.0.0-beta.17.5", "strapi-provider-upload-cloudinary": "^3.0.0-beta.17.5", "strapi-utils": "^3.0.0-beta.17.5" }, "author": { "name": "abc", "email": "", "url": "" }, "maintainers": [ { "name": "abc", "email": "", "url": "" } ], "strapi": { "uuid": "abcf5f65-060b-43f6-b98d-a4687fd81def" }, "engines": { "node": "10.x", "npm": ">= 6.0.0" }, "license": "MIT" }
有人知道我做错了什么吗?
感谢您提供任何建议和帮助。
升级stradi之前的当前版本Strapi-3.0.0-alpha.26.2(全局)节点-v10.17.0npm-6.11.3
我一直在按照本教程来学习trapi https://strapi.io/blog/building-a-static-website-using-gatsby-and-strapi但是当我安装时,我安装了alpha而不是beta是...
我遇到了同样的问题。我可以通过清空/api
文件夹来解决此问题,然后服务器重新开始工作。