Giter Club home page Giter Club logo

Comments (9)

boazblake avatar boazblake commented on May 26, 2024 1

I am having this issue with [email protected]

from create-mithril-app.

giancarlocp avatar giancarlocp commented on May 26, 2024 1

On linux using yarn.
/usr/bin/env: ‘node\r’: No such file or directory
I am fixing/removing the /r carriage return character following this:
https://stackoverflow.com/questions/21621722/removing-carriage-return-on-mac-os-x-using-sed

$ yarn global add create-mithril-app
$ yarn global list
yarn global v1.13.0
info "[email protected]" has binaries:
   - create-mithril-app
   - create-mithril-server
$ create-mithril-app m1
/usr/bin/env: ‘node\r’: No such file or directory
$ sed -i 's/\r//g' ~/.npm_modules/bin/create-mithril-*
$ create-mithril-app m1
module.js:549
    throw err;
    ^
Error: Cannot find module 'fs-extra'

I tried to install the fs-extra package

$ yarn global add fs-extra
warning "[email protected]" has no binaries

It is a yarn problem.
Then using npm it was installed.

$ npm -g i fs-extra
└─┬ [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  └── [email protected] 

But the problem persist.
So, i have removed all and tried again.

$ npm -g remove fs-extra
$ yarn global remove create-mithril-app
$ npm -g install create-mithril-app
└─┬ [email protected] 
  ├─┬ [email protected] 
  │ ├── [email protected] 
  │ ├── [email protected] 
  │ └── [email protected] 
  └─┬ [email protected] 
    └── [email protected] 
$ create-mithril-app m1
/usr/bin/env: ‘node\r’: No such file or directory
$ sed -i 's/\r//g' ~/.npm_modules/bin/create-mithril-*
$ create-mithril-app m1
module.js:549
    throw err;
    ^
Error: Cannot find module 'fs-extra'

struggling with node...

$ node -v
v8.10.0
$ npm -v
3.5.2

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

Thanks for reporting. I can recreate the issue, and will look into into.

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

I have pushed a fix for this issue in version 1.0.21. Tested under OS X using npm. It uses require.resolve to find the module path, so should work for yarn as well. Let me know if it still causes a problem.

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

I will have a look at both issues.

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

I have not had a chance to replicate the issue yet, however, I find this link, not sure if it's relevant

yarnpkg/yarn#648

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

@boazblake I also apologize for not seeing your comment before.

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

@giancarlocp The reason you are seeing
/usr/bin/env: ‘node\r’: No such file or directory
is that yarn does not know how to handle \r\n line ending.

I have fixed the line ending issue and published a new version [email protected]. It works on my Ubuntu now. You can give it a try (side note: you probably want to remove fs-extra from global first, because you don't need it)

yarn global remove fs-extra
yarn global add create-mithril-app@latest

We should probably file an issue with yarn regarding the line ending.

from create-mithril-app.

highmountaintea avatar highmountaintea commented on May 26, 2024

FYI I also filed a bug report with yarn to see if they'll change the behavior.

from create-mithril-app.

Related Issues (2)

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.