Giter Club home page Giter Club logo

strapi-examples's Introduction

Strapi logo Strapi logo

Open-source headless CMS, self-hosted or Cloud you’re in control.

The leading open-source headless CMS, 100% JavaScript/TypeScript, flexible and fully customizable.

Cloud · Try live demo · Strapi 5 (coming soon)


NPM Version Tests Strapi on Discord Strapi Nightly Release Build Status


Administration panel


Strapi Community Edition is a free and open-source headless CMS enabling you to manage any content, anywhere.

  • Self-hosted or Cloud: You can host and scale Strapi projects the way you want. You can save time by deploying to Strapi Cloud or deploy to the hosting platform you want**: AWS, Azure, Google Cloud, DigitalOcean.
  • Modern Admin Panel: Elegant, entirely customizable and a fully extensible admin panel.
  • Multi-database support: You can choose the database you prefer: PostgreSQL, MySQL, MariaDB, and SQLite.
  • Customizable: You can quickly build your logic by fully customizing APIs, routes, or plugins to fit your needs perfectly.
  • Blazing Fast and Robust: Built on top of Node.js and TypeScript, Strapi delivers reliable and solid performance.
  • Front-end Agnostic: Use any front-end framework (React, Next.js, Vue, Angular, etc.), mobile apps or even IoT.
  • Secure by default: Reusable policies, CORS, CSP, P3P, Xframe, XSS, and more.
  • Powerful CLI: Scaffold projects and APIs on the fly.

Getting Started

Read the Getting Started tutorial or follow the steps below:

⏳ Installation

Install Strapi with this Quickstart command to create a Strapi project instantly:

yarn create strapi-app my-project --quickstart

or

  • (Use npm/npx to install the Strapi project.)
npx create-strapi-app my-project --quickstart

This command generates a brand new project with the default features (authentication, permissions, content management, content type builder & file upload). The Quickstart command installs Strapi using a SQLite database which is used for prototyping in development.

Enjoy 🎉

🖐 Requirements

Complete installation requirements can be found in the documentation under Installation Requirements.

Supported operating systems:

  • Ubuntu LTS/Debian 9.x
  • CentOS/RHEL 8
  • macOS Mojave
  • Windows 10
  • Docker

(Please note that Strapi may work on other operating systems, but these are not tested nor officially supported at this time.)

Node:

Strapi only supports maintenance and LTS versions of Node.js. Please refer to the Node.js release schedule for more information. NPM versions installed by default with Node.js are supported. Generally it's recommended to use yarn over npm where possible.

Strapi Version Recommended Minimum
4.14.5 and up 20.x 18.x
4.11.0 and up 18.x 16.x
4.3.9 to 4.10.x 18.x 14.x
4.0.x to 4.3.8 16.x 14.x

Database:

Database Recommended Minimum
MySQL 8.0 5.7.8
MariaDB 10.6 10.3
PostgreSQL 14.0 11.0
SQLite 3 3

We recommend always using the latest version of Strapi stable to start your new projects.

Features

  • Content Types Builder: Build the most flexible publishing experience for your content managers, by giving them the freedom to create any page on the go with fields, components and Dynamic Zones.
  • Media Library: Upload your images, videos, audio or documents to the media library. Easily find the right asset, edit and reuse it.
  • Internationalization: The Internationalization (i18n) plugin allows Strapi users to create, manage and distribute localized content in different languages, called "locales"
  • Role Based Access Control: Create an unlimited number of custom roles and permissions for admin and end users.
  • GraphQL or REST: Consume the API using REST or GraphQL

You can unlock additional features such as SSO, Audit Logs, Review Workflows in Strapi Cloud or Strapi Enterprise.

See more on our website.

Contributing

Please read our Contributing Guide before submitting a Pull Request to the project.

Community support

For general help using Strapi, please refer to the official Strapi documentation. For additional help, you can use one of these channels to ask a question:

Migration

Follow our migration guides on the documentation to keep your projects up-to-date.

Roadmap

Check out our roadmap to get informed of the latest features released and the upcoming ones. You may also give us insights and vote for a specific feature.

Documentation

See our dedicated repository for the Strapi documentation, or view our documentation live:

Try live demo

See for yourself what's under the hood by getting access to a hosted Strapi project with sample data.

License

See the LICENSE file for licensing information.

strapi-examples's People

Contributors

alekbless avatar aurelsicoko avatar cosydney avatar davidkartuzinski avatar deliaz avatar derrickmehaffy avatar emrekeskinmac avatar gustavomarcante avatar heziode avatar jesusprubio avatar lauriejim avatar lvnilesh avatar n0mer avatar ndsamuelson avatar neverbe10 avatar nicroto avatar nigel5 avatar ntsvetkova-fcse avatar petersg83 avatar pierreburgy avatar ryanbelke avatar salomao-rodrigues avatar soldatovsh avatar soupette avatar techguydave avatar yodon avatar zeranoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

strapi-examples's Issues

clarification about creating many to many using the content type builder

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.

image

Any guide will be appreciate...I'm using postgresql...

thank you!!!

I am getting these errors on npm start for cheesecakes

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

Jekyll + Strapi Build Warning: Layout 'default' requested in home.html does not exist.

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.

TypeError: Cannot read property 'pathname' of undefined

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

Screenshot 2019-03-24 at 19 39 51

You shouldn't trust user input on the price

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)

How to make a dropdown from form.json

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?

I don't understand how to config schema.graphql?

I don't understand how to config schema.graphql?

i set strapi like this:

image

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

image

can you help me to config my schema.graphql?

Error: Cannot find module '../utils/Manager.js'

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.

Chrome 66: CSS and JS resources are not loaded due to distrusted SSL certificate

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.

Content type builder

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

Cheesecakes example error during setup

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?

Upgrade Gatsby Example to use the latest version: v2

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?

Could not find jekyll-strapi-0.1.1 in any of the sources

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.

  1. Following README, run
    cd api && npm install && npm start,
    success, Strapi server started.
  2. Following README, run
    cd blog && bundle install && bundle exec jekyll serve,
    said: bundle: command not found
  3. Run
    gem install bundler, and
    bundle install,
    said: Could not find jekyll-strapi-0.1.1 in any of the sources.
  4. Run
    gem install jekyll-strapi,
    said: public_suffix requires Ruby version >= 2.1.
  5. Run
    rvm install ruby-2.1, and
    gem install jekyll-strapi,
    said: ruby_dep requires Ruby version >= 2.2.5, ~> 2.2.
  6. Run
    rvm install ruby-head, and
    gem install jekyll-strapi,
    said: Successfully installed jekyll-strapi-0.1.2.
  7. Run
    bundle install && bundle exec jekyll serve,
    said: Could not find jekyll-strapi-0.1.1 in any of the sources.
  8. Run
    gem install jekyll-strapi-0.1.1,
    said: Could not find a valid gem 'jekyll-strapi-0.1.1' (>= 0) in any repository.
  9. Go back to step 4.

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.

Error on npm run dev

Node.js version:
v10.15.0
npm version:
6.9.1-next.0
Strapi version:

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

Cannot read property 'forEach' of null

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?

How to clear input fields in form after submit?

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'))}
              />

Cant create new project

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)

Route "/Admin" is not showing and no data is being imported on start of server.

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!

Getting 400 Bad Request for detail page on react-apollo example

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.

cheese cake example - Cannot read property 'policy' of null

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.

Google OAuth Provider Issue

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

  1. In the admin, enable Google as an OAuth Provider
  2. Input your client ID and client secret
  3. Leave The redirect URL to your front-end app and The redirect URL to add in your Google application configurations as is
  4. return to the client and go to /auth/login
  5. Attempt a login with Google

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

Why write an article for a broken code base?

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.

Undefined binding(s) detected when compiling SELECT query

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.

Next tutorial?

@pierreburgy Insteresting that you chose nuxt before next. Anyways, looking forward for a next.js-strapi tutorial that features authentication.

label:app:cheesecake not working

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.
screen shot 2019-02-05 at 15 54 53

If the current behavior is a bug, please provide the steps to reproduce the problem

What is the expected behavior?

Facebook Provider doesn't work with HTTPS

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.

error on npm install

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

Submit() is not responding when navigating in login area

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.

SOLVED: 404 Error from gatsby-source-strapi plugin

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

how to add one to many relations for two content types?

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?

Log in with Facebook not working

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

  • Start any of the app listed above
  • setup facebook login provider as per documentation
  • start strapi strapi start and start react app yarn start
  • open browser http://localhost:3000/auth/login
  • the first-time login with Facebook works as expected.
  • log out
  • log in with facebook again
  • receive error instead

Things I've tried

  • I have not tried with other social networks, but I suspect the same error will occur.
  • I have looked at the other issues logged with similar error message. However, they don't seem to be related as this seems to work the first time but not subsequent login.
  • Toggling off One account per email address will throw
    {"statusCode":400,"error":"Bad Request","message":{"message":"This username is already taken","field":["username"]}} which make sense
  • Also toggling off Enable 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.
  • It works if I delete the user from strapi admin and then try log in with facebook again (but only first time)
  • Tried local login with the Facebook user email with an invalid password, I get this error
    {"statusCode":400,"error":"Bad Request","message":"This user never set a local password, please login thanks to the provider used during account creation."} seems valid

What is the expected behaviour?
log in with facebook should work and not throw error

nuxt-strapi: strapi sdk.js throw error

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:

image

backend had being running well on localhost:1337, and api access tested with public user successfully;

What is the expected behavior?

GraphQL Error Unknown field `allStrapiArticle` on type `RootQueryType`

**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 |

multipleUpload stuck in pending

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?

Cooking a Deliveroo clone with Next.js

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:

screenshot 2018-12-24 at 02 54 14

screenshot 2018-12-24 at 02 55 42

screenshot 2018-12-24 at 02 53 27

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.

screenshot 2018-12-24 at 03 02 44

stripe

No compile

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?

Gatsby error

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.

cheesecakes example fails to run

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

  • Clone this repo
  • 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?

I'm getting these errors on gatsby develop for gatsby-source-strapi plugin

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

hello-world `mongoose` dependency is necessary, but currently is only a peer dependency

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.

graphql fails with API_URL

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.

cheesecakes example fails to load data, home page empty

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.