Code Monkey home page Code Monkey logo

Comments (4)

SharzyL avatar SharzyL commented on June 19, 2024 2

I also encountered this issue. Though the code on GitHub seems fine:

$ curl -sS https://raw.githubusercontent.com/srod/node-minify/6.2.0/packages/cli/bin/cli.js | head -1 | hexdump -c
0000000   #   !   /   u   s   r   /   b   i   n   /   e   n   v       n
0000010   o   d   e  \n
0000014

when I install from yarn or download from CDN, the fetched code break lines with \r\n. To reproduce:

$ curl -sS https://cdn.jsdelivr.net/npm/@node-minify/[email protected]/bin/cli.js | head -1 | hexdump -c
0000000   #   !   /   u   s   r   /   b   i   n   /   e   n   v       n
0000010   o   d   e  \r  \n
0000015

This problem only occurs for version 6, and only in bin/cli.js. No idea how this happened.

from node-minify.

davidyell avatar davidyell commented on June 19, 2024

I think this is just because the executable file has a windows line ending?

#!/usr/bin/env node\r\n

When I edit to to
#!/usr/bin/env node\n

It works okay

from node-minify.

srod avatar srod commented on June 19, 2024

Sorry for the delay, do you still have the issue?
I tried on my side; I can't reproduce.
Also tried to use dos2unix to convert cli.js, but nothing changed like it was already in Unix format.

from node-minify.

davidyell avatar davidyell commented on June 19, 2024

@srod Ahok, perhaps I opened the file in an editor which saved it with a different file ending maybe. Thanks for checking! I'll close this one as resolved 👍

from node-minify.

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.