js-beautify: Installing js-beautify fails
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.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 288
- Comments: 249 (4 by maintainers)
Commits related to this issue
- temporay fix js-beautify issue https://github.com/beautify-web/js-beautify/issues/1247 — committed to ZhongAnTech/zarm-vue by chrisHchen 7 years ago
- js-beautify issue https://github.com/beautify-web/js-beautify/issues/1247 — committed to rasoio/daon by deleted user 7 years ago
- Add js-beautify as dev dependency The installation of the npm package js-beautify fails: https://github.com/beautify-web/js-beautify/issues/1247 One of our dependencies uses the latest js-beautify ve... — committed to openattic/openattic by deleted user 7 years ago
- [bugfix] fix Fix "Installing js-beautify fails" bug #1247 — committed to Houfeng/js-beautify by Houfeng 7 years ago
- [bugfix] Fix "Installing js-beautify fails" bug #1247 — committed to Houfeng/js-beautify by Houfeng 7 years ago
- Hotfix for https://github.com/beautify-web/js-beautify/issues/1247 — committed to sunya9/beta by sunya9 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:
Mind the missing
^
.@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.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?
we are fucked…
we are fucked…
+2
me 2 we are preparing the latest update and now we fucked…
It looks like somebody got a good story to tell when will be a grandpa: “That day when I screwed up the whole programming world”
Nice monday, guys 😄
Wish I could lock this thread, this is fucking ridiculous.
WE ARE AWARE OF THE ISSUE, STOP SPAMMING AND USE THE POSTED WORKAROUNDS.
Just go back and use react / angular already.
Just found this. vue-cli is breaking as a result.
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?
Someone please delete every instance of
+1
and those rude comments in this thread. People seem to have no manners anymore …Adding this into the dependencies solved the build in our CI, should be good for a temporary fix. Thanks @danrot
To install vue-cli:
npm install -g js-beautify@1.6.14 vue-cli
I solved the problem this way: 1)rm -rf node_modules/ 2)npm install --save-dev js-beautify@1.6.14 3) add in package.json: “resolutions”: { “js-beautify”: “1.6.14” } 4)npm i
Can we please stop posting “+1”. It’s useless, doesn’t help the developer, and spam this issue with non-constructive comments. We’re developers, we hate useless bug tickets with no information, let’s NOT do the same things to fellow developers.
Stop the fucking “+1” without any information.
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 issuewe are fucked!!! i can’t work now.
@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 😃
fuck me
I can’t install vue-cli itself 2
Step one. Convince boss we should use vue. Step two. This issue. edit: Ok, we should probably not use this as a chat… Sorry.
Im fuck today of this
fuck it im switching everything to perl
This issue made my day
js-horrorify.
We are fucking!
This worked for us:-
Create npm-shrinkwrap.json parallel to package.json
This will work even if js-beautify is internally used in some other packages.
Please either un-publish the current version, or fix it ASAP…!
Temporary fix for vue-cli:
Do not install it globally but in a temp folder.
Then you can use the vue-cli installed like this:
The problem is that I can’t install vue-cli itself…
npm install -g vue-cli --registry=https://registry.npm.taobao.org
can resolve for nowwe are fucked
I don’t have permissions to the repo anymore, but I still have ownership of the npm package. I just published v1.7.1 that contains all necessary files.
Please, stop spamming this thread. As soon as @bitwiseman is back on the grid, he can handle the PR and whatnot.
@evocateur People is having important issues because of this, at least let them express it, otherwise we won’t know how big the impact is.
When they find someone who has the permission to merge PR’s… https://github.com/beautify-web/js-beautify/pull/1251
@steven-qi comments solved my issue with vue-loader.
add this to package.json.
+3 We are also facing the same issue
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 😉
Oh look, what’s this? 😮
A link to the official
/beautify-web/js-beautify
gitter so you don’t have to spam here?Truly revolutionary!
rm -rf node_modules/ rm -rf yarn.lock add this to package.json
yarn ok
Just the day I started with vue-cli xD
悲伤逆流成河
@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.nothing works 🙄
can’t believe this issue has cost me 3 hours of my life 😡
you broke vue 😢
Workaround: create a shrinkwrap for your project and force dependency versions for affected packages (e.g. vue-loader for me).
Create a npm-shrinkwrap.json file alongside where your package.json lives, add the following:
You may need to adjust version numbers, and if you have multiple dependencies relying on js-beautify you’ll have to list them all in there.
+1
+1
+1
+3
+2
npm:
npm install --save-dev js-beautify@1.6.14
yarn:yarn add js-beautify@1.6.14 --dev
Add this to your
package.json
file:npm install js-beautify@1.6.14
success.npm install js-beautify@1.7.0
failed.Important update for everyone that used these fixes in
vuejs
Time to remove
"js-beautify": "1.6.14"
from your"dependencies":{}
and"resolve":{}
vue-loader@13.0.5
has been published, please update.https://twitter.com/vuejs/status/909785891941617664
everybody panic
@niahmiah solution works, ty soo much i can finally work ! (‘npm install -g js-beautify@1.6.14 vue-cli’)
Install vue-cli with yarn then just replace js-beautify section in yarn.lock of your application with this:
js-beautify@^1.6.3: version "1.6.14" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.14.tgz#d3b8f7322d02b9277d58bd238264c327e58044cd" dependencies: config-chain "~1.1.5" editorconfig "^0.13.2" mkdirp "~0.5.0" nopt "~3.0.1"
this worked for me. I copied it from an older vue project.
This worked for me
rm -rf node_modules/ npm install js-beautify@1.6.14 npm install npm install cross-env npm run dev
+1
@hydrostasis
npm install -g vue-cli --registry=https://registry.npm.taobao.org
try thissequelize-cli
also breaks. Just waiting for the fix that I hope gets done today.also I had a problem with node-sass today: I solved the problem this way: 1)npm update 2)npm install 3)nodejs node_modules/node-sass/scripts/install.js 4)npm rebuild node-sass maybe someone will come in handy
These three JS files not exist in 1.7.0 released pkg.
+10086
I was getting ready to jump off a cliff before stumbling here. 😹
me too, this save me
vue-cli fails to install
Be my guest to make a PR. This is just a notification to the dev to show what the impact is of this issue.
I think some npm packages are using “js-beautify”: “^1.6.14” at the moment…
@evocateur that’s helpful for people but it’s also a huge issue as Atom/Atom-Beta packages are broken and there is not a good way to force those internal packages. The atom package manager (apm) and the packages for Atom Editor are broken since many of them including
atom-beautify
use this package directly.I agree that if you are on NPM/Yarn project you can easily and quickly fix this but for other users, this is quite breaking.
Global installation of “js-beautify” to solve the problem
cnpm install js-beautify@1.6.14 -g
we are fucked.
This is the most monday of any monday I have had for a long time.
This worked yea,
Broken here as well
this works for me.
package.json
:强帖留名!
haha 论lock 的重要性
+1
We are fucked
vue-loader is fucked. I wasted 40 minutes thinking something was wrong with my webpack config.
Yarn would not even report an error, NPM did. So I’m dropping Yarn, back to NPM
@zuolin777 You don’t have to, just add “js-beautify”: “1.6.14” into your package.json dependencies, then it should work.
@RuinSain, Windows 10 is a real serious problem. Get rid of it immediately!
Emergency fix for
vue-loader
is incoming: https://github.com/vuejs/vue-loader/commit/97bd432bba4350988bfd0db6d7a1a514b66a9826adding
"js-beautify": "1.6.14",
to my package.json worked. Thanks @weizsfor vue-cli
vue-init webpack project-name
cd project-name
npm install js-beautify@1.6.14 --save-dev
npm install
works for me@huysh3 i tried and have the same issue
昨晚上开始的
As stated here multiple times - use the older version of js-beautify
npm install js-beautify@1.6.14
Stop with the +1 so people can easily see the solution while the poor dev tries to fix things
Guys, you broke the Internet… 😦
+1
+1
i’m trying this issue https://github.com/beautify-web/js-beautify/issues/1247#issuecomment-330171050 i will tell you if it works @tst11
Guys… “plus ones” are so annoying and useless.
Again, just use the previous tag until this gets fixed.
If you have problem with running your vue-cli project
npm install js-beautify@1.6.14
fixed the problem for me.@briced We all know that one guy…
Btw…post mortem… “Don’t publish unnessessary files” 😉
https://github.com/beautify-web/js-beautify/pull/1241
Same here, installing our package now crashes because of this. We had to release patch for last 3 versions replacing
"js-beautify": "^1.6.4",
with"js-beautify": "~1.6.4",
the day, they drove my source-code down… singz in country
the issue i have is that i can’t install vue-cli not just js-beautify… i can get js-beautify with your solution but i still not have vue-cli
If you are facing issues because of a global dependency like me, make sure to install as follows:
Having multiple RUN statements won’t so install everything in one.
This worked for me
npm install -g npm
Then
npm install js-beautify@1.6.14
@tst11 this isn’t working for me XD
+1
A stack trace from my webpack config
we are fucked
Pushing code on a Sunday evening and going to sleep. Safe to say, Monday will be interesting to say the least.
npm is npm - shame, it would quite easy to avoid such situations, just make dummy package.json with most used packages and before someone updates any of those, make sure this dummy thing builds.
Temporarily, if you have a local copy of your project which work, try npm-shrinkwrap, update all the reference to js-beautify and add the npm-shrinkwrap.json file.
You will fix all version of all dependencies of your project but with with a working version of js-beautify if you npm. As soon as the latest version will be fixed, remove the npm-shrinkwrap.json file.
This issue is breaking the laravel npm install as well…
I’m trying all the above hacks but nothing worked so far. I try to deploy my app with
now
and the webpack build fails:I added the resolution to package.json without success. Any other idea what to add?
@YevheniiHerasymchuk there is one, https://github.com/beautify-web/js-beautify/pull/1251
everyone stop
What caused this problem? It still doesn’t work for me with webpack builds. Am fucked.
@hydrostasis just create a file npm-shrinkwrap.json parallel to package.json. Create this file manually as you create others.
Change my package.json to version 1.6.14 helps to me for the “sequelize-cli” issue: … “dependencies”: { … “request”: “^2.81.0”, “js-beautify”: “1.6.14”, “sequelize”: “^4.8.2”, …
@steven-qi Where is the package.json file stored? Trying to install vue-cli but I can’t.
Can not fix it use below steps
yarn.lock
andnode_modules
yarn
The steps is incorrent? @danrot
Same here, but then how do I start the
npm run dev
it gives the log of:@LinusBorg, I kinda enjoy the show 🍿
Can fix this problem now!!
In a laravel-mix and vue environment (maybe other setups too) easy fix can be:
Building now works for me.
guess I’ll be switching to yarn for good after this mess is fixed.
try yarn 👍
this is the issue (ty @gafung ) 😃
https://github.com/beautify-web/js-beautify/issues/1247#issuecomment-330145596
+1
+1
Same here, we found out in a production release (thanks to npm cache).
+11
+1
+1
+1
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 !
@oronoa Add this package in your package.json with version lock for
1.6.14
. It will override others.vue-cli npm install works well if you add dependency in package.json “js-beautify”: “1.6.14”,
@danrot how do I fix webpack ?