Coder Social home page Coder Social logo

#!/usr/bin/env node --harmony about strapi HOT 20 CLOSED

strapi avatar strapi commented on May 1, 2024
#!/usr/bin/env node --harmony

from strapi.

Comments (20)

loicsaintroch avatar loicsaintroch commented on May 1, 2024

With Node.js v0.12.7 ?

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

yes

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

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.

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

You can have a look here: http://stackoverflow.com/questions/24548733/how-to-make-a-nodejs-file-executable-with-harmony-option

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

or here: http://stackoverflow.com/questions/3306518/cannot-pass-an-argument-to-python-with-usr-bin-env-python

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

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?

from strapi.

mocallu avatar mocallu commented on May 1, 2024

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.

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

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?

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

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.

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

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

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

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 ?

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

Looks like oauth.js & oauth2.js need

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

instead of

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

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

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

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

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

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

Looks like everything is working fine, but still have

/usr/bin/strapi: 2: /usr/bin/strapi: [[: not found

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

It should be fixed: 968e36d.

Can you try and give me your feedback please?

from strapi.

sylvainlap avatar sylvainlap commented on May 1, 2024

OK for me. You can close it.

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

What about you @mocallu?

from strapi.

mocallu avatar mocallu commented on May 1, 2024

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

from strapi.

loicsaintroch avatar loicsaintroch commented on May 1, 2024

Perfect!

from strapi.

Related Issues (20)

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.