beautifier / js-beautify

Beautifier for javascript
https://beautifier.io
MIT License
8.61k stars 1.39k forks source link

Installing js-beautify fails #1247

Closed danrot closed 7 years ago

danrot commented 7 years ago

Description

I am trying to install a library, which is dependant on this one, and starting today (I've tried the last week the last time) I get the following error when installing my dependencies:

npm ERR! path /Users/daniel.rotter/Development/massiveart/sulu-minimal/vendor/sulu/sulu/node_modules/js-beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/daniel.rotter/Development/massiveart/sulu-minimal/vendor/sulu/sulu/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/daniel.rotter/.npm/_logs/2017-09-18T05_55_47_583Z-debug.log

It looks to me like this is somehow connected to the latest 1.7.0 release... Any ideas?

Steps to Reproduce

Create a new folder and install this library as dependency using npm install js-beautify.

Environment

OS: Mac OSX 10.11.6

Deleted most of the PR template, since it's not relevant.

IvanFan commented 7 years ago

me 2 we are preparing the latest update and now we fucked...

danrot commented 7 years ago

@IvanFan fucked is a little bit exaggerating IMO... Just use npm install js-beautify@1.6.14 for now, that will work until a fix is released.

IvanFan commented 7 years ago

We are using some third-party npm packages which are using js-beautify... Any idea how to force other dependencies to use the old version?

danrot commented 7 years ago

@IvanFan I am sure other libraries haven't updated to this version yet. So just add the following line to your dependencies:

{
    "dependencies": {
        "js-beautify": "1.6.14"
    }
}

Mind the missing ^.

summer11 commented 7 years ago

we are fucked...

luckyyyyy commented 7 years ago

we are fucked...

wh1100717 commented 7 years ago

we are fucked...

js-beautify@1.7.0 breaks the project installation and trying to use the lower version 1.6.14 for solving this issue

richhauck commented 7 years ago

Just found this. vue-cli is breaking as a result.

leo-yt commented 7 years ago

we are fucked

IvanFan commented 7 years ago

I think some npm packages are using "js-beautify": "^1.6.14" at the moment...

leo-yt commented 7 years ago

@IvanFan webpack

danrot commented 7 years ago

@IvanFan Doesn't matter, if your project defines it without ^ it will install exactly this version. ^1.6.14 means >= 1.6.14 && < 2.0, so it "works" with every of these versions.

inonbaguio commented 7 years ago
{
    "dependencies": {
        "js-beautify": "1.6.14"
    }
}

Adding this into the dependencies solved the build in our CI, should be good for a temporary fix. Thanks @danrot

leo-yt commented 7 years ago

@danrot how do I fix webpack ?

IvanFan commented 7 years ago

works thx @danrot :)

benjamin658 commented 7 years ago

@zuolin777 You don't have to, just add "js-beautify": "1.6.14" into your package.json dependencies, then it should work.

guoliangli123 commented 7 years ago

we are fucked!!!! i can't work now.

leo-yt commented 7 years ago

@benjamin658 thx, it works

brianmay commented 7 years ago

This bug report is only just over 30 minutes old for an upload that is only 1 hour old. How about giving the poor developer a chance to fix it? Or even better, providing a pull request to fix it?

RamonSmit commented 7 years ago

Be my guest to make a PR. This is just a notification to the dev to show what the impact is of this issue.

Ar4ics commented 7 years ago

vue-cli fails to install

achilleas01 commented 7 years ago

vue-cli npm install works well if you add dependency in package.json "js-beautify": "1.6.14",

danrot commented 7 years ago

@brianmay Finally somebody reasonable... It's not like we all have to stop working now, the temporary fix is quite easy.

My guess would also be that this library is primarily maintained in the spare time of the contributors, and I don't think that the attitude in this issue is very motivating... So I'd like to say thank you for the great work, and in advance for fixing this issue 😃

rrandom commented 7 years ago

The problem is that I can't install vue-cli itself..

gracefullight commented 7 years ago

I can't install vue-cli itself 2

kaidiren commented 7 years ago

npm install js-beautify@1.6.14 success.

npm install js-beautify@1.7.0 failed.

01BTC10 commented 7 years ago

Temporary fix https://npm.r2net.pro/#/detail/js-beautify or you can checkout tag v1.6.14 then host it locally.

oronoa commented 7 years ago

But what to do with other packages that depend on this pack?

munir131 commented 7 years ago

@oronoa Add this package in your package.json with version lock for 1.6.14. It will override others.

SagarNaliyapara commented 7 years ago

@danrot Thanks!

gafung commented 7 years ago

Temporary fix for vue-cli:

Do not install it globally but in a temp folder.

mkdir C:\vue_cli_temp
cd C:\vue_cli_temp
npm install js-beautify@1.6.14
npm install vue-cli

Then you can use the vue-cli installed like this:

C:\vue_cli_temp\node_modules\.bin\vue init simple MyVueProject
gosongs commented 7 years ago

me too, this save me

npm install -g js-beautify@1.6.14
karantan commented 7 years ago

+1

edit: npm install --save js-beautify@1.6.14 worked

ArmandJ77-zz commented 7 years ago

Thanks for suggestion to add "js-beautify": "1.6.14" to dependencies, saved my bacon while working with vuejs

SidBala commented 7 years ago

Pushing code on a Sunday evening and going to sleep. Safe to say, Monday will be interesting to say the least.

joelclipperton commented 7 years ago

@ArmandJ77 Which template are you using? I tried and retried and couldn't get it to work. Tried different node versions as well.

eric-naguras commented 7 years ago

People, just add "js-beautify": "1.6.14" under dependencies in your package.json. I had a problem with the vue pwa template but this solves it. Don't panic ;-)

joelclipperton commented 7 years ago

I guess yarn doesn't like this workaround.

angeltalk commented 7 years ago

@eric-naguras thank you eric

suykerbuykie commented 7 years ago

+1

eric-naguras commented 7 years ago

Yarn would not even report an error, NPM did. So I'm dropping Yarn, back to NPM

hjskevin commented 7 years ago

I install vue-cli use cnpm。it tell me “ no such file or directory, chmod 'C:\Users\zxrnh\AppData\Roaming\npm\node_modules\vue-cli\node_modules_js-beautify@1.7.0@js-beautify\js\bin\css-beautify.js“

this is my code cnpm install -g vue-cli who can help you !

gafung commented 7 years ago

@sobrown See my comment above.

susonwaiba commented 7 years ago

+1

jtyjty99999 commented 7 years ago

😓

bbosiljcic commented 7 years ago

:sob:

tinn2015 commented 7 years ago

+1

jason90929 commented 7 years ago

Noooooooooooooooooooooooooooooooo

DimDev commented 7 years ago

+1

daosonit commented 7 years ago

+1