Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

cli: No such file or directory #118

Closed
11111000000 opened this issue Nov 1, 2018 · 12 comments
Closed

cli: No such file or directory #118

11111000000 opened this issue Nov 1, 2018 · 12 comments

Comments

@11111000000
Copy link

11111000000 commented Nov 1, 2018

~/.npm/lib/node_modules/@canner/cli/download/dist]$ ldd ./cli
        linux-vdso.so.1 (0x00007ffecc5ec000)
        libdl.so.2 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib/libdl.so.2 (0x00007efe4f1f9000)
        librt.so.1 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib/librt.so.1 (0x00007efe4eff1000)
        libstdc++.so.6 => not found
        libm.so.6 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib/libm.so.6 (0x00007efe4ec60000)
        libgcc_s.so.1 => not found
        libpthread.so.0 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib/libpthread.so.0 (0x00007efe4ea42000)
        libc.so.6 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib/libc.so.6 (0x00007efe4e68b000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/i6kzbaaac0ppjab1230i70wdaz9klwl6-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007efe4f3f
d000)                                                                                                        
@11111000000
Copy link
Author

(nixos lastest)

@abz53378
Copy link
Contributor

abz53378 commented Nov 1, 2018

Hi, @11111000000 , thanks for the report.
Does the installation process well or any error occurs? And If you enter canner command, what's the error thrown? Thanks!

@11111000000
Copy link
Author

There is no any errors, until canner:
No such file or directory

@abz53378
Copy link
Contributor

abz53378 commented Nov 2, 2018

Thanks for the response, I found the reason is that nixos doesn't support executing binary files by default. You can see the official documentation here.

@11111000000
Copy link
Author

I know that :) So, you want to package canner everywhere? 2) How about working Dockerfile example?

@abz53378
Copy link
Contributor

Sounds great! We plan to use node-docker as the image, does it fit your needs?

@11111000000
Copy link
Author

it's ok for example, in practice we based on node-alpine

@abz53378
Copy link
Contributor

Here is the basic Dockerfile and canner.schema.js. But notice that the command canner script:serve is designed to preview the CMS when developing. The correct way to host Canner CMS is using canner script:deploy to deploy the schema and canner.cloud.js to our platform.

Please let me know whether this fit your needs, thanks!

Directory

|- Dockerfile
|- schema
   |- canner.schema.js

Dockerfile

FROM node:6
RUN npm install -g @canner/cli
WORKDIR /schema
COPY ./schema /schema
EXPOSE 80
CMD ["canner", "script:serve", "/schema/canner.schema.js", "--host", "0.0.0.0", "--port", "80"]

canner.schema.js

/** @jsx builder */
import builder from 'canner-script'

export default (
  <root>
    <object keyName="info">
      <string keyName="name" />
    </object>
  </root>
)

@abz53378
Copy link
Contributor

Hi, @FeklistovGleb, since we are using webpack-dev-server in canner script:serve for developing, the problem relates to the option. So I will add it soon and Inform you after new CLI releases. Thanks.

@11111000000
Copy link
Author

11111000000 commented Nov 15, 2018

Hi, @FeklistovGleb, since we are using webpack-dev-server in canner script:serve for developing, the problem relates to the option. So I will add it soon and Inform you after new CLI releases. Thanks.

@abz53378 How avoid this with current cli or we can use own cli?

@abz53378
Copy link
Contributor

Try using @canner/cli@2.6.3, you can use canner script:serve -d, --disable-host-check to ignore the host check. This option just a quick fix for the script:serve, we will support the static:build and start commands for production usage (#126 ) soon. There will be more options that I think can fit most needs.

Thanks!

@abz53378
Copy link
Contributor

Close this. The origin problem is resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants