hezzze / strapi-provider-upload-oss

A provider for strapi server to upload file to Aliyun OSS
MIT License
62 stars 13 forks source link

failed to run strapi develop after installation #8

Closed ghost closed 3 years ago

ghost commented 3 years ago

Steps:

  1. npm install strapi-provider-upload-oss --save in the strapi root folder
  2. create plugins.js in the config folder with the content provided in the README page
  3. run strapi develop

[2020-07-12T10:32:57.429Z] error Bootstrap function in plugin "upload" failed [2020-07-12T10:32:57.429Z] error Error: The provider package isn't installed. Please runnpm install strapi-provider-upload-oss``

do I need to input configs directly in the plugins.js or there is an admin panel to config?

Strapi package.json :

"knex": "<0.20.0",
"sqlite3": "latest",
"strapi": "3.0.5",
"strapi-admin": "3.0.5",
"strapi-connector-bookshelf": "3.0.5",
"strapi-plugin-content-manager": "3.0.5",
"strapi-plugin-content-type-builder": "3.0.5",
"strapi-plugin-email": "3.0.5",
"strapi-plugin-graphql": "3.0.5",
"strapi-plugin-upload": "3.0.5",
"strapi-plugin-users-permissions": "3.0.5",
"strapi-provider-upload-oss": "^0.1.5",
"strapi-utils": "3.0.5"

Many thanks

loongmxbt commented 3 years ago

Same issue. Is anybody know how to fix it?

hezzze commented 3 years ago

hey guys, I've got a local server running and I'm not sure I've encountered this issue, did you guys check in node_modules if the package strapi-provider-upload-oss exists?

hezzze commented 3 years ago

@lodisy @loongmxbt also please make sure that you have the correct environment variables setup for the following values, as specified in the sample config.js

ACCESS_KEY_ID=<your access key id>
ACCESS_KEY_SECRET=<your access key secret>
REGION=<bucket region>
BUCKET=<bucket name>
UPLOAD_PATH=<upload path>
TIMEOUT=<timeout>
ghost commented 3 years ago

@lodisy @loongmxbt also please make sure that you have the correct environment variables setup for the following values, as specified in the sample config.js

ACCESS_KEY_ID=<your access key id>
ACCESS_KEY_SECRET=<your access key secret>
REGION=<bucket region>
BUCKET=<bucket name>
UPLOAD_PATH=<upload path>
TIMEOUT=<timeout>

It works now. I thought there would be configurations on the admin side. Thanks.

hezzze commented 3 years ago

@loongmxbt let me know if the above solution works for you, will close if so

loongmxbt commented 3 years ago

@hezzze I've made a silly mistake, didn't use env correctly. Can close the issue.