Skip to content

#!/usr/bin/env node --harmony #4

Closed

Description

@sylvainlap

I made a fresh install of strapi.

Here is my environment:

sylvainlap@CanHardXI:~/DEV/WORKSPACE$ cat /etc/issue
Ubuntu 14.04.3 LTS
sylvainlap@CanHardXI:~/DEV/WORKSPACE$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
sylvainlap@CanHardXI:~/DEV/WORKSPACE$ ll /usr/bin/strapi 
lrwxrwxrwx 1 root root 40 oct.   3 11:14 /usr/bin/strapi -> ../lib/node_modules/strapi/bin/strapi.js*

But here is the problem:

sylvainlap@CanHardXI:~/DEV/WORKSPACE$ strapi new test
/usr/bin/env: node --harmony: Aucun fichier ou dossier de ce type

Activity

  1. loicsaintroch commented on Oct 3, 2015

    @loicsaintroch

    With Node.js v0.12.7 ?

  2. sylvainlap commented on Oct 3, 2015

    @sylvainlap
    ContributorAuthor

    yes

  3. loicsaintroch commented on Oct 3, 2015

    @loicsaintroch

    All right. I'll look into it this weekend and keep you informed as soon as I have a solution both for Node.js v0.12.x and Node.js v4.

  4. loicsaintroch commented on Oct 3, 2015

    @loicsaintroch

    I may have found a solution. It's on the fix/shebang branch. Steps:

    $ [sudo] npm uninstall strapi -g
    $ [sudo] npm cache clear
    $ git clone -b fix/shebang [email protected]:wistityhq/strapi.git
    $ cd strapi
    $ npm link

    Can you please try this solution and give me your feedback?

  5. mocallu commented on Oct 3, 2015

    @mocallu

    Hey guys, I have same problem. I tried using fix/shebang branch.

    Result:

    mocallu@mocallu-svf-elementary:~/strapi$ strapi login
    /usr/local/bin/strapi: 2: /usr/local/bin/strapi: [[: not found
    your Strapi email address 
    
    

    It was executed, but with /usr/local/bin/strapi: 2: /usr/local/bin/strapi: [[: not found before.

    I'm using node 4.1.1 on Ubuntu 14.04.

  6. loicsaintroch commented on Oct 4, 2015

    @loicsaintroch

    Okey, thank you for your feedback @mocallu.

    What about you @sylvainlap? Do you still have this issue or you have the same error than @mocallu?

  7. sylvainlap commented on Oct 4, 2015

    @sylvainlap
    ContributorAuthor

    Here is my result:

    sylvainlap@CanHardXI:~/DEV/WORKSPACE$ strapi new test
    /usr/bin/strapi: 2: /usr/bin/strapi: [[: not found
    info: Your new application `test` is ready at `/home/sylvainlap/DEV/WORKSPACE/test`.
    warn: You do not have a `.strapirc` file at `/home/sylvainlap`.
    warn: First, you need to create an account on http://dashboard.strapi.io/
    warn: Then, execute `$ strapi login` to start the experience.
    
  8. loicsaintroch commented on Oct 4, 2015

    @loicsaintroch

    Everything works fine? You just see an error before the logs?

  9. sylvainlap commented on Oct 4, 2015

    @sylvainlap
    ContributorAuthor

    I followed the readme:

    sylvainlap@CanHardXI:~/DEV/WORKSPACE$ strapi new test
    /usr/bin/strapi: 2: /usr/bin/strapi: [[: not found
    info: Your new application `test` is ready at `/home/sylvainlap/DEV/WORKSPACE/test`.
    warn: You do not have a `.strapirc` file at `/home/sylvainlap`.
    warn: First, you need to create an account on http://dashboard.strapi.io/
    warn: Then, execute `$ strapi login` to start the experience.
    
    sylvainlap@CanHardXI:~/DEV/WORKSPACE$ cd test/
    
    sylvainlap@CanHardXI:~/DEV/WORKSPACE/test$ strapi start
    /usr/bin/strapi: 2: /usr/bin/strapi: [[: not found
    module.js:338
        throw err;
        ^
    Error: Cannot find module '../Passport'
        at Function.Module._resolveFilename (module.js:336:15)
        at Function.Module._load (module.js:278:25)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)
        at Object.<anonymous> (/home/sylvainlap/DEV/WORKSPACE/test/modules/user/api/services/protocols/oauth.js:8:25)
        at Module._compile (module.js:460:26)
        at Object.Module._extensions..js (module.js:478:10)
        at Module.load (module.js:355:32)
        at Function.Module._load (module.js:310:12)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)
        at Object.<anonymous> (/home/sylvainlap/DEV/WORKSPACE/test/modules/user/api/services/protocols/index.js:4:10)
        at Module._compile (module.js:460:26)
        at Object.Module._extensions..js (module.js:478:10)
        at Module.load (module.js:355:32)
        at Function.Module._load (module.js:310:12)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)
        at Object.<anonymous> (/home/sylvainlap/DEV/WORKSPACE/test/modules/user/api/services/passport.js:16:22)
        at Module._compile (module.js:460:26)
        at Object.Module._extensions..js (module.js:478:10)
        at Module.load (module.js:355:32)
    

    Do I have to do strapi login first ?

  10. sylvainlap commented on Oct 4, 2015

    @sylvainlap
    ContributorAuthor

    Looks like oauth.js & oauth2.js need

    const PassportService = require('../passport');
    

    instead of

    const PassportService = require('../Passport');
    
  11. loicsaintroch commented on Oct 4, 2015

    @loicsaintroch

    Thanks! Just fixed this bug (see strapi/strapi-generate-users@84aefa9) and published v1.0.2 of strapi-generate-users.

  12. sylvainlap commented on Oct 4, 2015

    @sylvainlap
    ContributorAuthor

    I was making a pull request when I saw your commit ;)

  13. sylvainlap commented on Oct 4, 2015

    @sylvainlap
    ContributorAuthor

    Looks like everything is working fine, but still have

    /usr/bin/strapi: 2: /usr/bin/strapi: [[: not found
    
  14. loicsaintroch commented on Oct 5, 2015

    @loicsaintroch

    It should be fixed: 968e36d.

    Can you try and give me your feedback please?

  15. sylvainlap commented on Oct 5, 2015

    @sylvainlap
    ContributorAuthor

    OK for me. You can close it.

  16. loicsaintroch commented on Oct 5, 2015

    @loicsaintroch

    What about you @mocallu?

  17. mocallu commented on Oct 5, 2015

    @mocallu

    Yes, it's working now. Thank you @loicsaintroch!

  18. loicsaintroch commented on Oct 5, 2015

    @loicsaintroch

    Perfect!

  19. added
    issue: bug
    on Oct 6, 2015
  20. self-assigned this
    on Oct 6, 2015
  21. locked and limited conversation to collaborators on Oct 6, 2015
  22. modified the milestone: on Oct 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions