strapi / strapi-examples Goto Github PK
View Code? Open in Web Editor NEW:mortar_board: List of examples using Strapi
License: Other
:mortar_board: List of examples using Strapi
License: Other
Hello I am trying to learn about React-Redux authentications with JWT and yours examples works perfectly for me. But I have one question, how to make a dropbox with different value from yours form.json file. For example I want to add country to register formType. How to make dropdown of every country and make dropdown of them?
Node.js version:
9.8.0
npm version:
5.7.1
Strapi version:
"strapi": "3.0.0-alpha.10"
Operating system:
Ubuntu 14.04.5 LTS
Which example is causing problem?
cheesecake example
Do you want to request a feature or report a bug?
bug
What is the current behavior?
npm start
gives errors and no cakes on homepage!
(node:1523) UnhandledPromiseRejectionWarning: ValidationError: Cake validation failed: price: Path `price` is required.
at new ValidationError (/home/durabledrupal/try-stuff/try-strapi/strapi-examples/cheesecakes/node_modules/mongoose/lib/error/validation.js:27:11)
at model.Document.invalidate (/home/durabledrupal/try-stuff/try-strapi/strapi-examples/cheesecakes/node_modules/mongoose/lib/document.js:1700:32)
at /home/durabledrupal/try-stuff/try-strapi/strapi-examples/cheesecakes/node_modules/mongoose/lib/document.js:1572:17
at /home/durabledrupal/try-stuff/try-strapi/strapi-examples/cheesecakes/node_modules/mongoose/lib/schematype.js:785:9
at process._tickCallback (internal/process/next_tick.js:112:11)
Database is successfully created in mongodb, collections created, but they are all empty except core-store:
> db.core_store.find()
{ "_id" : ObjectId("5aa592cdc54fd4059cf43b9c"), "key" : "plugin_users-permissions_grant", "environment" : "", "tag" : "", "value" : "{\"email\":{\"enabled\":true,\"icon\":\"envelope\"},\"facebook\":{\"enabled\":false,\"icon\":\"facebook-official\",\"key\":\"\",\"secret\":\"\",\"callback\":\"/auth/facebook/callback\",\"scope\":[\"email\"]},\"google\":{\"enabled\":false,\"icon\":\"google\",\"key\":\"\",\"secret\":\"\",\"callback\":\"/auth/google/callback\",\"scope\":[\"email\"]},\"github\":{\"enabled\":false,\"icon\":\"github\",\"key\":\"\",\"secret\":\"\",\"redirect_uri\":\"/auth/github/callback\",\"scope\":[\"user\",\"user:email\"]},\"twitter\":{\"enabled\":false,\"icon\":\"twitter\",\"key\":\"\",\"secret\":\"\",\"callback\":\"/auth/twitter/callback\"}}", "type" : "object", "__v" : 0 }
{ "_id" : ObjectId("5aa592cdc54fd4059cf43b9d"), "key" : "core_application", "environment" : "", "tag" : "", "value" : "{\"name\":\"Default Application\",\"description\":\"This API is going to be awesome!\"}", "type" : "object", "__v" : 0 }
{ "_id" : ObjectId("5aa592cdc54fd4059cf43b9e"), "key" : "plugin_users-permissions_email", "environment" : "", "tag" : "", "value" : "{\"reset_password\":{\"display\":\"Email.template.reset_password\",\"icon\":\"refresh\",\"options\":{\"from\":{\"name\":\"Administration Panel\",\"email\":\"[email protected]\"},\"response_email\":\"\",\"object\":\"Reset password 🔑 \",\"message\":\"<p>We heard that you lost your password. Sorry about that!</p>\\n\\n<p>But don’t worry! You can use the following link to reset your password:</p>\\n\\n<p><%= URL %>?code=<%= TOKEN %></p>\\n\\n<p>Thanks.</p>\"}}}", "type" : "object", "__v" : 0 }
{ "_id" : ObjectId("5aa592cdc54fd4059cf43b9f"), "key" : "plugin_users-permissions_advanced", "environment" : "", "tag" : "", "value" : "{\"unique_email\":true,\"allow_register\":true}", "type" : "object", "__v" : 0 }
If the current behavior is a bug, please provide the steps to reproduce the problem
git clone [email protected]:strapi/strapi-examples.git
cd strapi-examples/cheesecakes
npm install
npm start
What is the expected behavior?
cakes on front page, no errors upon initializing data on first run.
Node.js version: v10.13.0
npm version: 6.5.0
Strapi version: 3.0.0-alpha.16
Operating system: MAC OS Sierra
Which example is causing problem?: react-login-front-end-app
Do you want to request a feature or report a bug? report a bug
What is the current behavior?
When logging in if a user clicks on Forgot Password and comes back to Ready to Sign in submit isn't responding anymore.
If the current behavior is a bug, please provide the steps to reproduce the problem
git clone project. Npm i. Npm Start
Before logging in navigate to Forgot Password and then navigate to Ready to sign in by clicking on links.
What is the expected behavior?
Expected behavior is to be able to sign in or get a response from server in the console.
is type=text?
In the readme.md for the cheesecake sample is a dead link, the third in the article:
https://blackrockdigital.github.io/
Good luck!
ERROR (1611 on s-MacBook-Pro.local): Cannot find module 'sendmail'
Error: Cannot find module 'sendmail'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Users/s/Desktop/strapi/strapi-examples/cheesecakes/plugins/email/services/Email.js:10:18)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
ERROR (1611 on s-MacBook-Pro.local): Cannot find module 'jsonwebtoken'
Error: Cannot find module 'jsonwebtoken'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Users/s/Desktop/strapi/strapi-examples/cheesecakes/plugins/users-permissions/services/Jwt.js:10:13)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
ERROR (1611 on s-MacBook-Pro.local): Cannot find module 'bcryptjs'
Error: Cannot find module 'bcryptjs'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Users/s/Desktop/strapi/strapi-examples/cheesecakes/plugins/users-permissions/services/User.js:11:16)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
(node:1611) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
**Node.js versionv10.8.0:
**npm version6.2.0:
**Strapi version3.0.0-alpha.13.0.1:
**Operating systemMacOs 10.14 Beta (18A353d):
Success delete html and css files from previous builds — 0.019 s
success open and validate gatsby-config — 0.006 s
success copy gatsby files — 0.018 s
success onPreBootstrap — 0.094 s
⠁ Starting to fetch data from Strapi (article)
Starting to fetch data from Strapi (user)
Fetch Strapi data: 38.918ms
The new node didn't pass validation
ValidationError: child "id" fails because ["id" must be a string]**
(node:3635) Warning: No such label 'Fetch Strapi data' for console.timeEnd()
warning The gatsby-source-strapi plugin has generated no Gatsby nodes. Do you need it?
success source and transform nodes — 0.071 s
success building schema — 0.106 s
success createLayouts — 0.031 s
success createPages — 0.001 s
success createPagesStatefully — 0.019 s
success onPreExtractQueries — 0.001 s
success update schema — 0.068 s
GraphQL Error Unknown field allStrapiArticle
on type RootQueryType
file: /Users/omerkunul/gatsby-strapi-tutorial/blog/src/pages/index.js
1 |
2 | query IndexQuery {
3 | allStrapiArticle {
| ^
4 | edges {
5 | node {
6 | id
7 | title
8 | content
9 | }
10 | }
11 | }
12 | }
13 |
Node.js version: v 11.0.0
npm version: v 6.4.1
Strapi version: 3.0.0-alpha.14.5
Operating system: Ubuntu 18
Example of : nuxt-strapi-deliveroo-clone-tutorial
Isuse:
following illustration in readme, and issues on browser localhost:3000:
backend had being running well on localhost:1337, and api access tested with public user successfully;
What is the expected behavior?
Can we manage Local State with Apollo Client?
It is mentioned that Mutations are not supported.
Node.js version: v10.1.0
npm version: [email protected]
Strapi version: 3.0.0-alpha.14.1.1
Operating system: macOS 10.13.6 (17G65)
Which example is causing problem?: Deliveroo Tutorial
What is the current behavior?
> [email protected] start /Users/odomojuli/Documents/GitHub/RN_PROTOTYPE/server
> node server.js
internal/modules/cjs/loader.js:573
throw err;
^
Error: Cannot find module '../utils/Manager.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:571:15)
at Function.Module._load (internal/modules/cjs/loader.js:497:25)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/odomojuli/Documents/GitHub/RN_PROTOTYPE/server/plugins/content-type-builder/services/ContentTypeBuilder.js:8:17)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@pierreburgy Insteresting that you chose nuxt before next. Anyways, looking forward for a next.js-strapi tutorial that features authentication.
You should query the database and calculator the total in this method. This is the way I did it with using Stripe and Firebase.
const orderData = queryOrder.data()
const productsPromise = orderData.items.map(item => database.collection('products').doc(item.id).get())
const products = await Promise.all(productsPromise)
const amount = products.reduce(( total, current ) => {
const currentProduct = orderData.items.find(product => product.id === current.id)
return (current.data().price * currentProduct.quantity) + total
}, 0)
Hi,
The Google+ closed. The Google+ API will also die.
What's about this page :
https://github.com/strapi/strapi-examples/blob/master/login-react/doc/google_setup.md
How to setup google now without the Google+ API ? :)
Hey guys, whenever I run gatsby develop
, these errors and warnings shows up:
⠁ Starting to fetch data from Strapi
Starting to fetch data from Strapi
error Plugin gatsby-source-strapi returned an error
Error: Request failed with status code 401
- createError.js:16 createError
[blog]/[axios]/lib/core/createError.js:16:15
- settle.js:18 settle
[blog]/[axios]/lib/core/settle.js:18:12
- http.js:192 IncomingMessage.handleStreamEnd
[blog]/[axios]/lib/adapters/http.js:192:11
- next_tick.js:152 process._tickCallback
internal/process/next_tick.js:152:19
warning The gatsby-source-strapi plugin has generated no Gatsby nodes. Do you need it?
and then:
GraphQL Error There was an error while compiling your site's GraphQL queries.
Invariant Violation: GraphQLParser: Unknown field `allStrapiArticle` on type `RootQueryType`. Source: document `IndexQuery` file: `GraphQL request`.
I followed the entire tutorial but got these errors. I tried just copy and paste all the code, to avoid typos, but the errors persisted. I also got the same errors when I cloned the project and ran all the npm install and stuff. :T
GET http://localhost:1337/cake/count 401 (Unauthorized)
Node.js version:
10.14.2
npm version:
6.4.1
Strapi version:
3.0.0-alpha.21
Operating system:
macOS 10.14
Which example is causing problem?
I'm following the nuxt/deliveroo tutorial and am up to creating dishes but got a "Cannot read property 'dishes' of null" error which I traced to the graphql query:
query {
restaurant(id: "1") {
id
name
dishes {
id
name
description
price
image {
url
}
}
}
}
When run in playground this returns an error:
"message": "Undefined binding(s) detected when compiling SELECT query: select restaurants
.* from restaurants
where restaurants
.id
= ? limit ?",
I have discovered that any query with an attribute, user(id: "1") or dish(id:"1") return the same error.
I am using a mysql database. The tables are all there and have data in them, just can't get these queries to work.
Something like:
query {
restaurants {
name
}
}
works fine.
Node.js version:
v10.13.0
npm version:
6.7.0
Strapi version:
Operating system:
mac Mojave
Which example is causing problem?
cheesecake
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I could installed the app an the admin is work fine
Also db created in my mongodb instance.
BUT I see almot empty page only sort by price dropdown and that's it.
If the current behavior is a bug, please provide the steps to reproduce the problem
What is the expected behavior?
Node.js version:
v8.6.0
npm version:
5.5.1
Strapi version:
3.0.0-alpha.12.2
Operating system:
Windows 10
Web Browser:
Google Chrome Version 66.0.3359.181 (Official Build) (64-bit)
Which example is causing problem?
cheesecakes
Do you want to request a feature or report a bug?
bug
What is the current behavior?
CSS and JS resources are not loaded.
Developer console:
The SSL certificate used to load resources from https://themehall.com has been distrusted. See https://g.co/chrome/symantecpkicerts for more information.
If the current behavior is a bug, please provide the steps to reproduce the problem
Open http://localhost:1337 in Chrome v66 or later.
What is the expected behavior?
Resources loaded without an error.
Comment
The problem lays on the owner of themehall.com that needs to replace their SSL certificate.
See https://security.googleblog.com/2018/03/distrust-of-symantec-pki-immediate.html for details.
Hello, I have question how to clear input after submit. Your examples sets form by url, but if I want to set form statically, how should I clear my inputs? My input component:
<Input
autoFocus={key === 0}
customBootstrapClass={get(input, 'customBootstrapClass')}
didCheckErrors={false}
errors={[]}
key={get(input, 'name')}
label={get(input, 'label')}
name={get(input, 'name')}
onChange={this.props.onChange}
placeholder={get(input, 'placeholder')}
type={get(input, 'type')}
validations={{ required: true }}
value={get(this.props.modifiedData, get(input, 'name'))}
/>
Node.js version: v8.9.4
npm version: 5.6.0
Strapi version: 3.0.0-alpha.12.2
Operating system: OSX 10.12.6
I have a problem with Facebook Provider:
I use login-react example (localhost:3000) and my API Strapi (https://api.myexample.com in local).
I use https in local because Facebook developer doesn't accept URI url is not https
But the redirect is incorrect : http://localhost:3000/auth/facebook/callback?access_token=...
I think that redirect would be : /auth/facebook/callback?code=...
I change this in Auth.js (users-permissions)
server: {
protocol: 'https',
host: 'myexample.com'
}
I don't know why ... Help please
Thk
PS: Not working with other Provider.
I'mtrying to follow the tutorial here: https://blog.strapi.io/building-a-static-website-using-gatsby-and-strapi/ and the following error occurs when running gatsby develop:
Starting to fetch data from Strapi (article)
Starting to fetch data from Strapi (user)
error Plugin gatsby-source-strapi returned an error
Error: Request failed with status code 404
createError.js:16 createError
[blog]/[axios]/lib/core/createError.js:16:15
settle.js:18 settle
[blog]/[axios]/lib/core/settle.js:18:12
http.js:192 IncomingMessage.handleStreamEnd
[blog]/[axios]/lib/adapters/http.js:192:11
next_tick.js:174 process._tickCallback
internal/process/next_tick.js:174:19
error UNHANDLED REJECTION
TypeError: Cannot read property 'filter' of undefined
api-runner-node.js:287 Promise.mapSeries.catch.then.results
[blog]/[gatsby]/dist/utils/api-runner-node.js:287:42
util.js:16 tryCatcher
[blog]/[bluebird]/js/release/util.js:16:23
promise.js:512 Promise._settlePromiseFromHandler
[blog]/[bluebird]/js/release/promise.js:512:31
promise.js:569 Promise._settlePromise
[blog]/[bluebird]/js/release/promise.js:569:18
promise.js:614 Promise._settlePromise0
[blog]/[bluebird]/js/release/promise.js:614:10
promise.js:694 Promise._settlePromises
[blog]/[bluebird]/js/release/promise.js:694:18
async.js:138 _drainQueueStep
[blog]/[bluebird]/js/release/async.js:138:12
async.js:131 _drainQueue
[blog]/[bluebird]/js/release/async.js:131:9
async.js:147 Async._drainQueues
[blog]/[bluebird]/js/release/async.js:147:5
async.js:17 Immediate.Async.drainQueues [as _onImmediate]
[blog]/[bluebird]/js/release/async.js:17:14
I'm following the article as closely as possible given that the Strapi version you are using is quite different from the Strapi@alpha14 release I am using. I have created a guest role as none exists (I'm assuming anyway that the public role is the equivalent). Also, I have followed the "Allow Access" section as closely as possible given that also seems to be different in the alpha14 release.
Strapi gives me no indication at all that I have set the permissions correctly. I'm only at the "learning" stage for both Strapi and Gatsby and I'm at a bit of a loss as to how to proceed from here.
Any advice greatly appreciated.
Thanks
Whats the problem here, i get the following error message after installting node js and strapi
~$ strapi new myProject
/usr/local/lib/node_modules/strapi/bin/strapi.js:10
const _ = require('lodash');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:437:25)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
pages.zip
Node.js version:
v10.15.0
npm version:
C:\dvl\proyectos\platforms\gatsby-strapi-tutorial\blog>npm -v
6.5.0
Strapi version:
3.0.0-alpha.18
Operating system:
windowa 10
Which example is causing problem?
no compile
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce the problem
What is the expected behavior?
Node.js version: v9.3.0
npm version: 5.6.0
Strapi version: 3.0.0-alpha.12.7.1
Operating system: Mac OS Sierra 10.12.6
Which example is causing problem?
Cheesecake
Do you want to request a feature or report a bug?
I see this as a bug, would be helpful to include more documentation on configuration of mongodb.
What is the current behavior?
Starting the server with npm install & start. No admin panel is showing up and data is not being imported into my mongodb instance localhost. Appears to me like a bug.
If the current behavior is a bug, please provide the steps to reproduce the problem
git clone [email protected]:strapi/strapi-examples.git
npm install && npm start
mongo
use cheesecakes
What is the expected behavior?
[2018-07-11T20:06:56.048Z] debug GET /cake/count (24 ms)
TypeError: Cannot read property 'policy' of null
at module.exports (/../strapi-examples/cheesecakes/plugins/users-permissions/config/policies/permissions.js:50:18)
at <anonymous>
TypeError: Cannot read property 'policy' of null
at module.exports (/../strapi-examples/cheesecakes/plugins/users-permissions/config/policies/permissions.js:50:18)
at <anonymous>
[2018-07-11T20:06:56.052Z] debug GET /info (21 ms)
[2018-07-11T20:06:56.052Z] debug GET /cake?_sort=id&_start=0&_limit=3 (14 ms)
Thank you for any help! Happy Coding!
Node.js version: 9.10.1
npm version:5.6.0
Strapi version:3.0.0-alpha.12.2
Operating system:macOS
Which example is causing problem?
jekyll-strapi-tutorial
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Can't start Jekyll server.
If the current behavior is a bug, please provide the steps to reproduce the problem
Operating system is macOS, didn't install bundler, jekyll-strapi, latest ruby before.
cd api && npm install && npm start
,cd blog && bundle install && bundle exec jekyll serve
,gem install bundler
, andbundle install
,gem install jekyll-strapi
,rvm install ruby-2.1
, andgem install jekyll-strapi
,rvm install ruby-head
, andgem install jekyll-strapi
,bundle install && bundle exec jekyll serve
,gem install jekyll-strapi-0.1.1
,Have no idea how to continue.
What is the expected behavior?
I expect I can follow README to run this example.
Please provide a complete README to avoid above headache, and help solve 'Could not find a valid gem 'jekyll-strapi-0.1.1' (>= 0) in any repository' error.
Hey guys !
I really like Strapi but I am scratching my head with SQL-db relation.
So a user can create many "Messages"
but user can subscribe to only one message from other User
In SQL I have 3tables for it but how to build it using the content-type-builder
Thank you
Node.js version:
v11.2.0
npm version:
6.4.1
Strapi version:
3.0.0-alpha.16
Operating system:
macOS Mojave 10.14.1
Which example is causing problem?
Do you want to request a feature or report a bug?
bug
What is the current behavior?
upload plugin is missing mutation multipleUpload, i tried editing the schema.graphql , if i pass the files variables the request is stuck in pending
const _ = require('lodash');
module.exports = {
mutation: `
upload(refId: ID, ref: String, source: String, file: Upload!): UploadFile!,
multipleUpload(refId: ID, ref: String, source: String, files: [Upload!]): [UploadFile!]
`,
resolver: {
Query: {
file: false,
files: {
description: 'Return files uploaded',
resolver: {
plugin: 'upload',
handler: 'Upload.find'
},
}
},
Mutation: {
createFile: false,
updateFile: false,
deleteFile: false,
upload: {
description: 'Upload one file',
resolver: async (obj, { file, ...fields}, { context }) => {
// Construct context to fit with koa-parser guidelines
// and avoid to update our business logic too much.
context.request.body = {
files: {
files: await file
},
fields
};
// Call controller action.
await strapi.plugins.upload.controllers.upload.upload(context);
// Handle case when the user is uploading only one file.
if (_.isArray(context.body) && context.body.length === 1) {
return context.body[0];
}
// Return response.
return context.body;
}
},
multipleUpload: {
description: 'Upload multiple files',
policy: ['plugins.users-permissions.isAuthenticated', 'isOwner'],
resolver: async (obj, { files, ...fields}, { context }) => {
console.log('###multipleUpload')
// Construct context to fit with koa-parser guidelines
// and avoid to update our business logic too much.
context.request.body = {
files: {
files: await files
},
fields
};
// Call controller action.
await strapi.plugins.upload.controllers.upload.upload(context);
// Handle case when the user is uploading only one file.
if (_.isArray(context.body) && context.body.length === 1) {
return context.body[0];
}
// Return response.
return context.body;
}
},
}
}
};
If the current behavior is a bug, please provide the steps to reproduce the problem
What is the expected behavior?
Node.js version:
10*
npm version:
6*
Strapi version:
Operating system:
ubonto 18.04
Which example is causing problem?
react-login-front-end-app
⚠ The /home/linuxdan/Downloads/strapi-examples/login-react/react-login-front-end-app/node_modules/imagemin-pngquant/node_modules/pngquant-bin/vendor/pngquant
binary doesn't seem to work correctly
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/home/linuxdan/Downloads/strapi-examples/login-react/react-login-front-end-app/node_modules/imagemin-pngquant/node_modules/bin-build/node_modules/execa/index.js:231:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
npm WARN react-boilerplate@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node lib/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/linuxdan/.npm/_logs/2019-02-04T15_12_11_205Z-debug.log
Node.js version:
10
npm version:
Strapi version:
3 alpha 14
Operating system:
mac
Which example is causing problem?
react-apollo
BUG
What is the current behavior?
visiting the detail page (http://localhost:3001/form/product/5b856a99fb67e97163d6c23a) by clicking on a line item results in the following error: Error: Error: Network error: Response not successful: Received status code 400
If the current behavior is a bug, please provide the steps to reproduce the problem
create a new product line item. click the product line item.
What is the expected behavior?
should show detail page.
Node.js version: 10.4.1
npm version: 6.1.0
Strapi version: 3.0.0-alpha.24.1 (this is a frontend issue though)
Operating system: macOS Mojave
Which example is causing problem?
nextjs-react-strapi-deliveroo-clone-tutorial
Do you want to request a feature or report a bug?
bug
What is the current behavior?
I can run 'npm run dev' or 'npm start' without issues but when I open locallhost:3000 the page loads with 'error loading restaurants' and I get a server side typeError (see screenshot)
(no front end console errors)
If the current behavior is a bug, please provide the steps to reproduce the problem
cd frontend
npm install
npm run build
npm run dev or npm start
What is the expected behavior?
to run without errors
Node.js version:
v8.10.0
npm version:
5.6.0
Strapi version:
3.0.0-alpha.14.1.1
Operating system:
OSX
Which example is causing problem?
login-react
and react-apollo
Do you want to request a feature or report a bug?
yes, I believed this is a bug🐛
What is the current behaviour?
I get a 400 bad request
{"statusCode":400,"error":"Bad Request","message":[{"messages":[{"id":"Auth.form.error.email.taken"}]}]}
If the current behaviour is a bug, please provide the steps to reproduce the problem
strapi start
and start react app yarn start
http://localhost:3000/auth/login
Things I've tried
One account per email address
will throw{"statusCode":400,"error":"Bad Request","message":{"message":"This username is already taken","field":["username"]}}
which make senseEnable sign-ups
will give this error{"statusCode":400,"error":"Bad Request","message":[{"messages":[{"id":"Auth.advanced.allow_register"}]}]}
which should not be the case since I'm not trying to register a new user but log in with an existing user.{"statusCode":400,"error":"Bad Request","message":"This user never set a local password, please login thanks to the provider used during account creation."}
seems validWhat is the expected behaviour?
log in with facebook should work and not throw error
Node.js version:
10.10.0
npm version:
6.4.1
Strapi version:
3.0.0-alpha.14.4.0
Operating system:
osx
Which example is causing problem?
cheesecakes
Do you want to request a feature or report a bug?
bug
What is the current behavior?
i installed and started the server with npm start. when i go to localhost:1337, it is empty. Error message is:
[2018-11-07T15:58:36.693Z] debug GET index.html (19 ms)
[2018-11-07T15:58:36.766Z] debug GET /scripts/index.js (4 ms)
TypeError: Cannot read property 'policy' of null
at module.exports (/Users/erdesina/node/strapi-examples/cheesecakes/plugins/users-permissions/config/policies/permissions.js:50:18)
[2018-11-07T15:58:38.355Z] debug GET /cake/count (14 ms)
TypeError: Cannot read property 'policy' of null
at module.exports (/Users/erdesina/node/strapi-examples/cheesecakes/plugins/users-permissions/config/policies/permissions.js:50:18)
[2018-11-07T15:58:38.359Z] debug GET /info (15 ms)
TypeError: Cannot read property 'policy' of null
at module.exports (/Users/erdesina/node/strapi-examples/cheesecakes/plugins/users-permissions/config/policies/permissions.js:50:18)
[2018-11-07T15:58:38.367Z] debug GET /cake?_sort=id&_start=0&_limit=3 (19 ms)
I tried:
db['users-permissions_permission'].updateMany({}, {$set: {enabled: true}})
Didnt help.
I don't understand how to config schema.graphql?
i set strapi like this:
and i want to update dianzan by react-apollo
here is my code:
import React from "react";
import ReactDOM from "react-dom";
import ApolloClient, { gql } from "apollo-boost";
import { ApolloProvider, Mutation ,Query} from "react-apollo";
const client = new ApolloClient({
uri: "http://localhost:1337/graphql"
});
const GET_TODOS = gql`
query {
todos{
id
dianzan
}
}
`;
const UPDATE_TODO = gql`
mutation updatePostPayload($id: ID!, $type: String!) {
updateTodo(id: $id, dianzan: $type) {
id
dianzan
}
}
`;
function App() {
return (
<Query query={GET_TODOS}>
{({ loading, error, data }) => {
if (loading) return <p>Loading...</p>;
if (error) return <p>Error :(</p>;
return data.todos.map(({ id, dianzan }) => {
let input;
return (
<Mutation mutation={UPDATE_TODO} key={id}>
{updateTodo => (
<div>
<p>{dianzan}</p>
<form
onSubmit={e => {
e.preventDefault();
console.log("----------------------print---------------------------")
console.log(dianzan)
console.log(id)
updateTodo({ variables: { id, type: input.value } });
input.value = "";
}}
>
<input
ref={node => {
input = node;
}}
/>
<button type="submit">Update Todo</button>
</form>
</div>
)}
</Mutation>
);
});
}}
</Query>
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(
<ApolloProvider client={client}>
<App />
</ApolloProvider>,
rootElement
);
i konw i need to config "schema.graphql", But I'm always at a loss. here is Todo.settings.json
:
{
"connection": "default",
"collectionName": "todo",
"info": {
"name": "todo",
"description": ""
},
"options": {
"timestamps": true
},
"attributes": {
"dianzan": {
"type": "string"
}
}
}
now what should schema.graphql be?. you can add a application in
can you help me to config my schema.graphql?
Node.js version: v10.14.2
npm version: 6.4.1
Strapi version: [email protected]
Operating system: Linux Mint 19.1
Which example is causing problem? nuxt-strapi-deliveroo-clone-tutorial/client
Do you want to request a feature or report a bug? bug
What is the current behavior? When running the server and client both in a VM, with API_URL specified in scripts.dev in package.json for the client, accessing the client in a browser got me a "Network Error": An error occurred while rendering the page. Check developer tools console for details.
In the Chrome developer tools, I find an attempt to connect to "http://localhost:1337/graphql".
If the current behavior is a bug, please provide the steps to reproduce the problem See above.
What is the expected behavior? The "graphql" query should be going to the API_URL as well.
Operating system:
Windows 7 Ultimate x64
Which example is causing problem?
nuxt-strapi-deliveroo-clone-tutorial
Do you want to request a feature or report a bug?
bug
What is the current behavior?
x error Error: Plugin not found: D:[GitLab]\strapi-examples\nuxt-strapi-deliveroo-clone-tutorial\client.nuxt\bootstrap-vue.js
at Promise.all.plugins.map (D:[GitLab]\strapi-examples\nuxt-strapi-deliveroo-clone-tutorial\client\node_modules\nuxt\dist\nuxt.js:4011:15)
if I remove "modules: ['bootstrap-vue/nuxt']" in nuxt.config.js, above error is gone but
I will get another error which is.
nuxt-strapi-deliveroo-clone-tutorial\client\node_modules\snapdragon\lib\parser.js:473
throw new Error('no parsers registered for: "' + self.input.slice(0, 5) + '"');
If the current behavior is a bug, please provide the steps to reproduce the problem
I just follow the step given.
cd nuxt-strapi-deliveroo-clone-tutorial
cd client
npm install
npm run dev
hello guys, I was seeing that the content type builder allows you to create many to many relationships, since to do this you need an intermediate table, is it possible to create this relationship using the content type builder? no need for code or configuration? is there any guide to do this?
I suppose there must be a convention regarding the names of the columns, for example, I have the table article and tag, I created a content type called article_tag which will work as junction table and I try to set the id of the article with the column article_id of my junction table but the system does not allow me to do it.
Any guide will be appreciate...I'm using postgresql...
thank you!!!
Node.js version: 11.1.0
NPM version: 6.4.1
Strapi version: 3.0.0-alpha.17
Database: MariaDB/Mysql 10.3.10
Operating system: Mac
Optional) Link to your Project: https://github.com/Williamyip146/deliveroo
I have problems with the checkout page, once I've made the payment I get a 500 error message and redirect to homepage. I've checked on the Admin backend to check the order table is still empty after the payment has been made. The following are the errors i am getting:
It suppoed to update the order table and display the latest orders, made by the clients. On the stripe it shows the payment was successed so i am not sure what's causing the errors.
Node.js version: v10.0.0
npm version: 5.6.0
Strapi version: 3.0.0-alpha.12.1.3
Operating system: Ubuntu 16.04
Which example is causing problem? Cheesecakes Example
Do you want to request a feature or report a bug? Bug
What is the current behavior? When running 'npm run setup --plugins' error below is seen:
``The setup process can take few minutes.
🔸 Administration Panel
📦 Installing packages...
🏗 Building...
0% compiling/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babel-core/lib/transformation/file/index.js:558
throw err;
^
SyntaxError: /home/user/Node Projects/strapi/strapi-examples/cheesecakes/plugins/graphql/services/GraphQL.js: Unexpected token (269:12)
267 | return async (ctx, next) => {
268 | ctx.params = {
> 269 | ...params,
| ^
270 | [model.primaryKey]: ctx.params.id
271 | };
272 |
at Parser.pp$5.raise (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4454:13)
at Parser.pp.unexpected (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:1761:8)
at Parser.pp$3.parseIdentifier (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4332:10)
at Parser.pp$3.parsePropertyName (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4156:96)
at Parser.pp$3.parseObj (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4045:12)
at Parser.pp$3.parseExprAtom (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3719:19)
at Parser.pp$3.parseExprSubscripts (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3494:19)
at Parser.pp$3.parseMaybeUnary (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3474:19)
at Parser.pp$3.parseExprOps (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3404:19)
at Parser.pp$3.parseMaybeConditional (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3381:19)
at Parser.pp$3.parseMaybeAssign (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3344:19)
at Parser.pp$3.parseMaybeAssign (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3367:23)
at Parser.pp$3.parseExpression (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3306:19)
at Parser.pp$1.parseStatement (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:1906:19)
at Parser.pp$1.parseBlockBody (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:2268:21)
at Parser.pp$1.parseBlock (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:2247:8)
at Parser.pp$3.parseFunctionBody (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4235:22)
at Parser.pp$3.parseArrowExpression (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:4190:8)
at Parser.pp$3.parseAsyncArrowFromCallExpression (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3590:15)
at Parser.pp$3.parseSubscripts (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3540:21)
at Parser.pp$3.parseExprSubscripts (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3504:15)
at Parser.pp$3.parseMaybeUnary (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3474:19)
at Parser.pp$3.parseExprOps (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3404:19)
at Parser.pp$3.parseMaybeConditional (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3381:19)
at Parser.pp$3.parseMaybeAssign (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3344:19)
at Parser.pp$3.parseExpression (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:3306:19)
at Parser.pp$1.parseReturnStatement (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:2078:26)
at Parser.pp$1.parseStatement (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:1848:19)
at Parser.pp$1.parseBlockBody (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:2268:21)
at Parser.pp$1.parseBlock (/home/user/Node Projects/strapi/strapi-examples/cheesecakes/admin/node_modules/babylon/lib/index.js:2247:8)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `APP_PATH=$APP_PATH npm run build:dll && node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production IS_ADMIN=true node ./node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config ./node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-05-11T13_44_06_744Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] setup: `node ./scripts/setup.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-05-11T13_44_06_774Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] setup: `cd admin && npm install && npm run setup`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-05-11T13_44_06_782Z-debug.log
Mongo has the cakes data but no category data. The landing page runs on 'npm start' but no data (cakes) are seen.
If the current behavior is a bug, please provide the steps to reproduce the problem
By running installation process and 'npm run setup --plugins'.
Not really sure how to fix this issue.
What is the expected behavior?
Node.js version:
v9.5.0
npm version:
5.6.0
Strapi version:
3.0.0-alpha.11.1
Gatsby version:
1.1.45
Operating system:
Windows 10
Which example is causing problem?
Gatsby blog
Do you want to request a feature or report a bug?
bug
What is the current behavior?
error on final step of the tutorial: https://hackernoon.com/building-a-static-blog-using-gatsby-and-strapi-8b5acfc82ad8
After adding the function to fetch authors, the following is printed to the console during the compilation:
The new node didn't pass validation
ValidationError: child "id" fails because ["id" is required]
{ username: 'chris',
...
id: undefined,
...
}
If the current behavior is a bug, please provide the steps to reproduce the problem
Follow the tutorial, but use a newer version of Strapi
What is the expected behavior?
id should probably have a value.
I don't know either framework very well, or I might have tried modifying the plugin to get the id field from _id.
ubuntu@ip-172-31-61-13:
$ sudo git clone https://github.com/strapi/sample-strapi-app$ remote: Repository not found.
Cloning into 'sample-strapi-app'...
Username for 'https://github.com':xxx
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/strapi/sample-strapi-app/' not found
ubuntu@ip-172-31-61-13:
Also why does it ask to auth at all?
Node.js version:
9.11.1
npm version:
5.4.2
Strapi version:
3.0.0-alpha.11.3
Operating system:
MacOS
Which example is causing problem?
good-old-react-authentication-flow
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
After enabling Google as an OAuth provider in the Strapi admin, I attempt to use the provider for a login. I click the Google button and in the client receive this message: {"message":"An internal server error occurred","statusCode":500,"error":"Internal Server Error"}
. Looking at the server output the only error I'm seeing is simply: error undefined is not a function
along with the GET request
If the current behavior is a bug, please provide the steps to reproduce the problem
/auth/login
An additional note is that after configuring the Provider settings correctly, I was able to reach the Google account selection page. However, I am now only receiving the {"message":"An internal server error occurred","statusCode":500,"error":"Internal Server Error"}
error in the client
What is the expected behavior?
Go to Google account selection, be returned to logged in state within the app
I did not feel any of the questions were relevant to my "issue" I'm just curious as to why This article on Medium is NO WHERE near accurate to: nextjs-react-strapi-deliveroo-clone-tutorial
?
These sorts of things just throw people off as I'm sure you can tell by all the comments. Being that this is an "official" strapi
article, it only makes sense that you properly write the article and don't leave steps out that appear to be sending everyone for a loop.
Node.js version: v8.9
npm version:5.5
Strapi version:3.0.0-alpha
Operating system:Ubuntu
Which example is causing problem?
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce the problem
What is the expected behavior?
Node.js version:
ANY
npm version:
ANY
Strapi version:
Latest
Operating system:
N/A
Which example is causing problem?
Gatsby Example: https://github.com/strapi/strapi-examples/tree/master/gatsby-strapi-tutorial/blog
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
The examples use Gatsby v1, but v2 is the latest with many improvements. Is there a plan to upgrade to Gatsby v2 or do you have a recommended resource for Strapi with that?
Hello, I am getting two errors;
✖ error TypeError: Cannot read property 'forEach' of null
at Object.fetch (pages/index.js:86:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
Could you help?
Strapi version:
v3.0.0-alpha.14
Which example is causing problem?
http://localhost:3000/form/product/1
this edit page tap to submit is wrong!
because __typename : "Product" in query(data[params.contentType] )
How do I solve this problem?
Node.js version:
v10.11.0
npm version:
6.4.1
Strapi version:
3.0.0-alpha.14.2
Operating system:
Debian Stretch 64Bit
Which example is causing problem?
Jekyll + Strapi
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Jekyll Console says: Build Warning: Layout 'default' requested in home.html does not exist.
If the current behavior is a bug, please provide the steps to reproduce the problem
My Jekyll is jekyll 3.8.4 I receive the error message posted below and the template minima won't be shown with the posts. I do only see the title "Posts" and I need to navigate to localhost:4000/home.html to see it. This seems to be more a Jekyll problem than a Strapi problem I guess?
What is the expected behavior?
It won't say that and it will work I guess.
Node.js version: v10.11.0
npm version: 6.4.1
Strapi version: 3.0.0-alpha.14.2
Operating system: Mac OS High Sierra 10.13.4
Which example is causing problem?
hello-world
Do you want to request a feature or report a bug?
bug
What is the current behavior?
npm install
does not automatically install [email protected]
. It is only suggested as a peer dependency. If the user does not manually install this dependency, then npm start
fails to boot the server. See the following gist for the log: https://gist.github.com/gwpantazes/8711bf0cf15165fb04e374aa4659f11c
If the current behavior is a bug, please provide the steps to reproduce the problem
Follow the instructions in the README.
npm install
npm start
As of running npm start
, observe that the server fails to start because it cannot find the mongoose module.
At this point, manually installing with npm install [email protected]
fixes the issue.
What is the expected behavior?
mongoose
would be included not as a peer dependency, but as an actual dependency, if it was actually necessary to run the example. Running npm install
would be sufficient to successfully run npm start
.
Node.js version:
9.0.0
npm version:
5.1.1
Strapi version:
3.0.0 alpha 12.7 globally and 3.0.0 alpha 12.3 for project (strapi-examples/cheesecakes current version)
Operating system: Linux
Which example is causing problem?
cheesecakes
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
Can't run example.
If the current behavior is a bug, please provide the steps to reproduce the problem
cd cheesecakes
npm install
strapi start
And it's my terminal output:
[2018-07-12T06:56:16.192Z] debug Server wasn't able to start properly.
(hook:mongoose) takes too long to load
What is the expected behavior?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.