Giter VIP home page Giter VIP logo

apostrophe-boilerplate's People

Contributors

abea avatar alexgleason avatar alohaas avatar benirose avatar boutell avatar fredrikekelund avatar jsumnersmith avatar jth- avatar rzumstein avatar sepastian avatar theworkflow avatar valjed avatar

Stargazers

 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

apostrophe-boilerplate's Issues

Docker Compose up -- Property undefined

To Reproduce

docker compose up -d

Details

[+] Building 1.8s (9/19)
=> [apostrophe internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 792B 0.0s
=> [apostrophe internal] load .dockerignore 0.0s
=> => transferring context: 134B 0.0s
=> [apostrophe internal] load metadata for docker.io/library/node:14 1.1s
=> [apostrophe auth] library/node:pull token for registry-1.docker.io 0.0s
=> [apostrophe 1/14] FROM docker.io/library/node:14@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa 0.0s
=> [apostrophe internal] load build context 0.0s
=> => transferring context: 7.30kB 0.0s
=> CACHED [apostrophe 2/14] WORKDIR /app 0.0s
=> CACHED [apostrophe 3/14] COPY package* ./ 0.0s
=> ERROR [apostrophe 4/14] RUN npm ci 0.6s

[apostrophe 4/14] RUN npm ci:
0.588 npm ERR! Cannot read property 'apostrophe' of undefined
0.595
0.595 npm ERR! A complete log of this run can be found in:
0.595 npm ERR! /root/.npm/_logs/2023-08-02T13_37_10_109Z-debug.log


failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 1
docker-compose process finished with exit code 17

Style sheet could not be opened

Using the code from the tutorial to create default.html, a boilerplate page is created. However, the pages is not presented correctly in the browser. The hero and hero-text classes do not seem to be defined.
(http://mapworldlive.com:3000/new-page - a development system when app.js is running)

The developer tools in Firefox report that a style sheet could not be loaded:
/modules/apostrophe-assets/css/vendor/pikaday.less

In searching the software, I find the file is actually in:
./node_modules/apostrophe/lib/modules/apostrophe-assets/public/css/vendor/pikaday.less

Strangely, Chrome developer tools do not report this.

docker-build-assets-with-temporary-mongod: line 5: mongod: command not found

I am trying to install build the docker images but this error is raised:

╰─± docker compose build --no-cache
[+] Building 88.5s (17/18)                                                                                                
 => [internal] load build definition from Dockerfile                                                                 0.0s
 => => transferring dockerfile: 773B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                    0.0s
 => => transferring context: 34B                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:14                                                           0.0s
 => [internal] load build context                                                                                    0.0s
 => => transferring context: 5.27kB                                                                                  0.0s
 => [ 1/14] FROM docker.io/library/node:14                                                                           0.0s
 => CACHED [ 2/14] WORKDIR /app                                                                                      0.0s
 => [ 3/14] COPY package* ./                                                                                         0.0s
 => [ 4/14] RUN npm install                                                                                         34.5s
 => [ 5/14] RUN mkdir scripts                                                                                        0.7s
 => [ 6/14] RUN npm install -g m                                                                                     1.5s 
 => [ 7/14] RUN apt-get -y update                                                                                    3.5s 
 => [ 8/14] RUN apt-get -y install scons                                                                             3.2s 
 => [ 9/14] RUN m 3.6                                                                                                4.2s 
 => [10/14] RUN m tools stable                                                                                       4.3s 
 => [11/14] RUN npm install -g pm2                                                                                  21.1s 
 => [12/14] COPY . ./                                                                                                0.0s 
 => ERROR [13/14] RUN ./scripts/docker-build-assets-with-temporary-mongod                                           15.4s 
------                                                                                                                    
 > [13/14] RUN ./scripts/docker-build-assets-with-temporary-mongod:                                                       
#0 0.347 ./scripts/docker-build-assets-with-temporary-mongod: line 5: mongod: command not found                           
#0 0.356 docker-wait-for-port: waiting 15 seconds for mongo:27017                                                         
#0 15.35 docker-wait-for-port: timeout occurred after waiting 15 seconds for mongo:27017
------
failed to solve: executor failed running [/bin/sh -c ./scripts/docker-build-assets-with-temporary-mongod]: exit code: 124

Apostrophe Custom-Widgets is not working.

I'm using apostraphecms version 3.
I followed these steps to create a custom widget - https://v3.docs.apostrophecms.org/guide/custom-widgets.html#creating-a-widget-type

Once the configuration is done I restarted the application and checked in UI, the custom widget is not showing.

My widget folder structure is my-project/modules/two-column-widget.

index.js

//my-project/modules/two-column-widget/index.js
module.exports = {
  extend: '@apostrophecms/widget-type',
  options: {
    label: 'Two Column Widget',
  },
  fields: {
    add: {
      columnOne:{
        type: 'area',
        label: 'Column One',
        options:{
          widgets:{
            '@apostrophecms/rich-text':{}
          }
        }
      },
      columnTwo:{
        type: 'area',
        label: 'Column Two',
        options:{
          widgets:{
            '@apostrophecms/rich-text':{}
          }
        }
      }
    }
  }
};

widget.html

//my-project/modules/two-column-widget/views/widget.html
<section data-two-column-widget>
  <div class="two-col__column">
    {% area data.widget, 'columnOne' %}
  </div>
  <div class="two-col__column">
    {% area data.widget, 'columnTwo' %}
  </div>
</section>

app.js

require('apostrophe')({
  shortName: 'apos-app',
  modules: {
    '@apostrophecms/rich-text-widget': {
      options: {
        className: 'bp-rich-text'
      }
    },
    '@apostrophecms/image-widget': {
      options: {
        className: 'bp-image-widget'
      }
    },
    '@apostrophecms/video-widget': {
      options: {
        className: 'bp-video-widget'
      }
    },
    'two-column-widget':{},
    'product':{},
    asset: {},
    'default-page': {}
  }
});

These are the codes I have configured for custom widgets. While I run the project I don't have any errors though.
console:

apos-app % npm run dev
> [email protected] dev /Projects/apos-app
> nodemon

[nodemon] 2.0.15
[nodemon] reading config ./package.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 56075 to restart
[nodemon] ignoring: ./.git/**/* locales/*.json ./public/uploads/**/* public/apos-frontend/*.js ./data/**/*
[nodemon] watching path(s): app.js modules/**/* lib/**/*.js views/**/*.html
[nodemon] watching extensions: json,js,html,scss,vue
[nodemon] starting `node app.js`
[nodemon] forking
[nodemon] child pid: 56077
[nodemon] watching 28 files
(node:56077) DeprecationWarning: isConnected is deprecated and will be removed in the next major version
(Use `node --trace-deprecation ...` to show where the warning was created)
🧑‍💻 Building the Public-facing modern JavaScript and Sass...
👍 Public-facing modern JavaScript and Sass is complete!
🧑‍💻 Building the Raw CSS and JS...
👍 Raw CSS and JS is complete!
Listening at http://localhost:3000

Can anyone please help me to resolve the issue?

Node.js version in Dockerfile

During environment setup, the latest Node.js version will be installed.

I was wondering why there is a specific Node version specified in the Dockerfile? Isn't it better to just pull the node image instead of node:<version>? No need to constantly update the version.

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.