Fixed. My fault - it seems I had an old version of cocos in /usr/local/bin.
Using the ‘cocos’ command gives me the error shown below (on Cocos2D-JS 3.0 Alpha).
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.