We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Trying Zephir - cannot build first script based on documentation example

Hi all,

https://blog.zephir-lang.com/post/73772370742/installing-testing-zephir-on-vagrant

I'm having problem with this step:

Now, we can create an skeleton for a simple extension: $ zephir init utils The following files are created: $ ls utils/ config.json ext utils "config.json" does not get created and "zephir build" fails with "Zephir\Exception: Extension namespace cannot be loaded".

I'm clueless as to where to look for solution. Anyone, please?



8.1k
Accepted
answer
edited Sep '14

Don't worry :) That is issue of this zephir version.

Zephir doesn't generate config.json file in project directory.

See https://github.com/phalcon/zephir/blob/master/Library/Config.php#L146

You can uncomments 153...159 strings :)

Yoy can do it after installing zephir also. And all will be ok.

P.S. Now it fixed. You can reinstall zephir.