Grunt for Brackets Extension Not Working For me - gruntjs

When I use this plugin, Grunt for Brackets, it doesn't seem to work for me. I've looked and looked and looked through the files of the extension, and when I "grunt," my devtools spit out this log.
[node-log 10:01:49 AM] { '0': { [Error: spawn ENOENT] code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn' } }
I'm not exactly sure what that means...
Here is a link to the extension.
The author has not updated anything in months, and there is an open issue ticket, however there hasn't been any responses.
If someone could help me decipher this log, I would greatly appreciate it.

Do you have Grunt installed on your computer already? If so, is it installed in the standard location? (e.g. did you intsall using npm -g grunt?)
ENOENT basically means "file not found," and since the error message also says spawn I'm guessing the problem is it's unable to find the Grunt binary to execute.
Update: Looks like a bug in how the current version of the extension was packaged. You should be able to fix it yourself this way:
Help > Show Extensions Folder in Brackets and find the brackets-grunt extension in the 'user' subfolder
Open a command prompt at that location
cd into the node folder inside the extension
Run npm install
I added a note to the bug, so hopefully the extension's author will fix it soon too.

Related

Error: EACCES: permission denied, unlink '/usr/local/bin/npm

First and foremost I have looked into these previous post for answers: EACCES: permission denied, unlink
Error: EACCES: permission denied, unlink '/usr/local/bin/npx'
Error while building or running ngx-bootstrap tests
I do not see the answers I seek in any of these posts, or maybe I am not knowledgable enough to decipher how to use those answers to fix my issue. I am still learning so please, if you are answering my post make sure you explain, so that I may fully grasp what is being done and why. I would appreciate it very much.
In VS Code I was trying to work on a project but needed to update the npm version. See example:
After researching the f***(pardon my language) out of this, I did the following:
after reading this article: https://flaviocopes.com/npm-fix-missing-write-access-error/
I did what he suggested and then tried to do the npm update.
I then did the following, to find who owns the directory
After this I am pretty much at lost of what to do next, why do I have three 'drwxr-xr-x'? what does that exactly mean, that I have three npm packages? can I combine them all into one? or would it be better to delete all and start from scratch, but would I run into the same issue?
I also read this:
To minimize the chance of permissions errors, you can configure npm to
use a different directory. In this example, you will create and use a
hidden directory in your home directory.
Back up your computer. On the command line, in your home directory,
create a directory for global installations: mkdir ~/.npm-global
Configure npm to use the new directory path: npm config set prefix
'~/.npm-global' In your preferred text editor, open or create a
~/.profile file and add this line: export PATH=~/.npm-global/bin:$PATH
On the command line, update your system variables: source ~/.profile
To test your new configuration, install a package globally without
using sudo
but will that work if I have to [unlink '/usr/local/bin/npm'], according to the terminal. In all honestly, I prefer not reconfigure as I would need to back up everything, does anyone have a solution or suggestion as to what to do?
Thank you all in advance. And again I would like to reiterate that I am still learning, so please be kind and elaborate on your answer.
See if you have another path setup
like **
/usr/local/share/npm/bin
**
or so and just run install like this below.
**
sudo npm install npm#latest -g
**

How to install JSHint

I get this popup in VSCode: Failed to load jshint library. Please install jshint in your workspace folder using 'npm install jshint' or globally using 'npm install -g jshint' and the press Retry
Tried using Command Prompt in Win10
Can I get a literal step by step process Please.
(Please Note I am absolutely New to all of this, Currently Learning HTML/CSS & the above is popped up)
Thanks in Advance
QB
just follow the prompt given.
open Command Prompt in Win10.
and for all future work. do this.
npm install -g jshint
and
-g is for adding it globally.
For future reference - always try to copy and paste the error/prompt in Google first and you will be able to find answers yourself and will be able to find more and learn more stuff related to issues after seeing how many people get same thing in start and how they fixed it.
For future reference - BOOKMARK THIS - https://www.w3schools.com/whatis/whatis_npm.asp there's a lot for a beginner in simple words. hope this helped you.

After restart ZSH cannot find NPM, Gulp or Bower

Context
Earlier this week, while my computer was starting Ubuntu 17.10 it shutoff due to low battery.
The Problem
Upon plugging in and rebooting I noticed some unusual behavior. One of the key things was that Oh My ZSH appears to be broken. Meaning, when I opened Terminal, pressed the up arrow to cycle through my history, and hit enter to execute the command: it reported it could not find my ZSH history log and failed to execute the command.
What I've Tried
So I assumed that ZSH was corrupted as a consequence of the improper shut down. So I reinstalled and the history error disappeared. But then it couldn't find NPM, Gulp or Bower. Meaning, when I executed something like gulp watch it reports zsh: command not found: gulp.
So I attempted to reinstall gulp with NPM and it reported the same error but for NPM.
I concluded that they were still installed and not corrupted but that ZSH simply can't find them.
So I tried a random command to export "paths" from a bash file to my ZSH file (I think they're called .rc files but I don't remember).
Then it seems to work.
Then I closed Terminal and it stopped working.
So I reinstalled ZSH again, this time using apt-get and it worked without having to export my paths.
Then I restarted (properly) and discovered it's broken again.
The Question
Can anyone explain why this is happening and how to resolve it?
short answer: add path in your ~/.zshrc
tl;dr
find executable path for your libraries or programs and add them
nano ~/.zshrc
export PATH=/path/to/lib/or/bin:$PATH
then save the file (ctl+o)
after this restart your zsh or reload the rc file (source ~/.zshrc)

Every command heroku fails with 'ENOENT': spawn tasklist ENOENT

I am aware one question exists already but he had a different issue as he answered himself. I am running on windows 32 bit and trying to run heroku. It stopped somehow after I restart the terminal one time. Now literally anything I enter using the heroku cli, I get this error:
'ENOENT': spawn tasklist ENOENT
I tried running heroku version but still the same. In my path I have linked it to C:\. . .\Heroku\bin. It worked but even after reinstalling it does not work.
P.S. Does this have anything to do with my node installation? I have node installed too. Is it clashing?
On Windows, you need to locate tasklist.exe on your PC.
Typically, it is found in Windows/system32/
If it is there, put the basepath to it in PATH Environmental variable.
Then open new cmd.exe as Administrator.
Now, you should NOT see the 'ENOENT': spawn tasklist ENOENT error message.
I had the same issue, while I was not operating as Administrator. When running heroku commands as admin in shell, it started working. I found this discussion to be helpful: https://github.com/heroku/heroku-pg-extras/issues/129.
Hope that helps.
Cheers
I also had same issues but i resolved mine by running cmd as adminstrator. and login back into heroku by using these command
heroku auth:login
and wala! you can bounce back to your project.
i recommend looking at these
helpful link

gulp-ruby-sass - 'sass' is not recognized as an internal or external command, operable program or batch file

I'm trying to run gulp-ruby-sass on Windows.
I've already installed Ruby and Sass like that:
$ gem install sass
My gulp.task looks like this:
gulp.task('styles', function() {
return sass('src/scss/**/*.scss')
.on('error', sass.logError)
.pipe(gulp.dest('css'));
});
When I cd into the root directory of my project and run $ gulp styles,
I get this:
[22:54:52] Using gulpfile c:\wamp\www\wordpress\
wp-content\themes\bootscores\gulpfile.js
[22:54:52] Starting 'styles'...
[22:54:52] 'sass' is not recognized as an internal or external command,
operable program or batch file.
Error in plugin 'gulp-ruby-sass'
Message:
Gem undefined is not installed.
[22:54:52] Finished 'styles' after 89 ms
I've been searching for a solution to this problem for about two hours now and still haven't found one that would help me.
I've finally found a solution.
I had to manually add a path to my Ruby bin folder in Control Panel > System > Advanced > Environment Variables. Here i added a new variable named path with a path to my Ruby bin folder (C:\Ruby22-x64\bin).
Then I restarted my Node.js command prompt and got the output I was looking for.
Thank you, CDF, for you answer and effort!
Even though I answered this question myself, I hope it will eventually help other people too.
I had the same error, only in my situation sass package wasn't installed in RubyGem.
You need to execute following command:
gem install sass
Use the Ruby installer and reinstall it. Then check the path checkbox. It should be resolved then.
Install Sass Using the Command Prompt
[CMD] + [R]
type cmd hit [ENTER]
Type gem install sass
If you get an error message then it's likely you will need to use the sudo command to install the Sass gem. It would look like:
sudo gem install sass
4 Reboot the NODE command line. In fact you might want to reboot the system, most users do not do enough of that.

Resources