Gruntfile not found - sublimetext2

I am trying to use Sublime Text 2 with Grunt, but I can't get it working.
The watch task is working if I do it on the Windows console (so it is installed correctly), but not in ST, there it says "Gruntfile.js or Gruntfile.coffee not found" (using the Grunt plugin).
I have no idea why, because there is a folder called "build" containing the Gruntfile.js and the other stuff in the project directory.
I tried removing ST and the plugin and installed it again, but still the same problem.
Any ideas?

Gruntfile should be at the root of the project.
http://gruntjs.com/getting-started#the-gruntfile
You can see the exact code that's throwing the error here: https://github.com/tvooo/sublime-grunt/blob/master/main.py#L41

Related

Live Sass Compiler causing Extension Host crash after latest VSCode

I am trying to use sass styling and Live Sass Compiler extension, I recently installed it and now keep getting a extension host terminated unexpectedly error using VS Code.I have re-installed Live Sass Compiler several times as well as all my Live extensions and restarted my VS Code. Live Extensions I've re-installed. I know its the Live Sass Compiler causing this issue, because once I uninstall, I don't see the error anymore, but I can't update any styling in my . scss files. Everything is up to its current version.
How can I keep using Sass if this extension isn't working? Sass extension error Thank you!
This has been bothering me for so bloody long... Turns out (for me anyway) it was the extension "Color Highlight" that was causing it to crash. I'm going to be very careful downloading random extensions in the future..
for my situtation it blocks me only when I import a partial scss file so disabled it and only enable it when i have no more partial files to import.
color highlight is very useful for me.
or you can use the npm module "node-sass" with the flag -w
This is the exact issue I'm facing currently while using the "Live Sass Compiler". Whenever I try to edit any "#import" lines it just gives me the error.
See this image ... Extension host termination error!
Problem:
I'm facing this issue only while using the "Live Sass Compiler" as you can see in the screenshot ... Error in detail. This is similar to the one you're getting.
Quick Fix:
There must be some interruptions in the process due to which the extension is causing this error. Now, continue using the sass compiler and getting rid of that error I would suggest you uninstall the "Live Sass Compiler" and instead use npm install node-sass --save-dev to install the node-sass compiler as a dependency. Now in package.json enter the required script for node-sass to run.
This will allow you to compile .scss files to css. For more info checkout this link "https://www.npmjs.com/package/node-sass".
Hope you got your answer,
Cheers!

silverstripe 4 server error after removing module

I'm having problems with using fluent in Silverstripe 4. So I tested to install different versions of fluent to see if I was able to get it working. The version of Silverstripe is 4.1.1.
After uninstalling fluent again, I get "server error" and I can't see anything in the php logs and when trying to run in dev mode, I don't see any difference.
One puzzling thing is that a folder named "themes" appeared in the root folder. I think that it was added by composer during the module installation, but I'm not sure. But I do know that git listed the themes folder as an untracked file. Which suggests that it was automatically added. So I removed that folder when uninstalling the module.
Now I'm not sure what to do. I would want to restore the database as it was before installing fluent (I've tried to add language to see if fluent was working). Or at least get back to square one.
How do people usually do when working with Silverstripe and testing modules?
What I've done so far:
Checked the php logs. No errors found.
Added "Director::set_environment_type("dev");" to _config.php, without seeing any difference when loading the page.
Tested to load the page with ?dev=1 without any difference.
I ran composer update and now the site is working. Might be one thing to test for silverstripe noobs (like me).

Visual studio project.json does not have a runtime section

I ran into a error in visual studio 2017, I'm searching over the net but I don't find anything usefull, so my question is, how can I solve this:
Severity Code Description Project File Line Suppression State
Error Your project.json doesn't have a runtimes section. You should add '"runtimes": { "win": { } }' to your project.json and then re-run NuGet restore.
I was seaching for file where is located in my project but with no succsess.
Thanks
I got rid of this problem by manually deleting Visual Studio obj folder of the project that it's complaining about (the 'Clean Solution' command wasn't getting rid of it).
I found the answer through this and this threads.
I had the same issue after trying to migrate all my projects to the new .csproj format manually. I had an issue with one projet in the new format, so I reverted from git, and this message started to show up.
What I did:
Closed VS
Removed the .vs folder
Removed the packages folder
Restarted VS
Tried to build
Had issues with namespaces not found, as if packages were not installed
Opened NuGet package manager console
Ran Update-Package -reinstall -ProjectName <project>
Problem gone!
Hope it helps someone with the same issue :)
I upgraded a NuGet Package.
Then I undid some changes for the project, but the NuGet Packege had created a json file called project inside the project folder.
Inside this file, I could find runtimes.
But I just deleted this json file and built again.

Visual Studio 2015 - Where's the gulp task runner?

I heard Mads Kristensen in his videos mention that Gulp and Grunt are both first class citizens. I thought I even heard mention of the Gulp task runner.
But when I create a gulpfile and right click there's no task runner.
Has anyone been able to get the "native" gulp task runner (if there is one) in Visual Studio 2015 Preview to appear?
View > Other Windows > Task Runner Explorer and click refresh
or just Ctrl + Alt + Bkspace
The Preview version of VS2015 requires Gulp to be installed globally and has a few other issues with auto-discovery of the gulpfile.js. These issues will all be addressed by the time VS2015 ships.
I had this same problem with VS2015 - TRX was showing "no tasks found" even though I had a valid, linted, gulpfile.js in the site root. I found the answer here: http://www.roelvanlisdonk.nl/?p=4258
Steps: Close VS. Open a cmd prompt from the site root and run npm install. Re-open VS and you should see your tasks in TRX. It worked for me.
EDIT: I had gulp installed globally but still encountered this "error." The above steps resolved the issue though.
Well I solved the problem with several restarts of VS2015. Finally the task runner appeared for my gulpfile. I still have no idea why it did not appear from the start but it's a preview version so maybe something is not quite right yet.
Barryman9000's answer helped me on the right track. I started with an empty ASP.NET 5 project in VS2015 and had no package.json file at the project root. Running npm install gave me an error message about missing package.json. After adding that file with the default dependencies from another ASP.NET 5 project, the Dependencies started downloading and my gulpfile tasks appeared in the Task Runner Explorer.
In your bash, go to the directory gulpfile.js is installed in and run:
npm install gulp
Why the downvotes? Please read the OP's question and the comments beneath it. Also, note that the answer with, currently, the most points has nothing to do with the question. Also please note that Mads Kristensen himself said that the issue was to install gulp.
Also, as for the commenter "Bonner" of this answer, note that Bash doesn't mean Linux. You can install git bash for Windows and run all of your NPM and Git commands there. Most developers I know use that bash on windows for all npm needs.
Lastly, if your Gulp Task Runner is not working, that is most likely because it is not recognizing your gulpfile. That is due to gulp not being installed. VS2015 didn't always install gulp for you. So the fix was to install gulp globally (As Mads Kristensen said), or directly where your gulpfile is. Also, restarting or re-installing VS sometimes kickstarted the gulp installation if you're lucky.
Conclusion: My answer is the correct answer. I reference the actual OP Question, comments beneath it, Mads Kristensen, and even the accepted answer. Yet, this answer is in the negative and some random answer about how to use the "View" menu in Visual Studio has 40 points.

How to properly update Monogame with a Github PR

Heey,
I got a little problem. The current Monogame 3.2 build available hasn't got a working template for Windows Phone 8. This will result into a black screen and a non working app. So I went onto their git hub and found the issue https://github.com/mono/MonoGame/pull/2089 and someone who fixed it and posted a Pull request.
The problem now is I have close to zero experience with building my own version or editing project template files. I got some common knowledge and started to delve into this all and already tried copying the template files to my visual studio files and building projects and throwing around the new .DLL but it all doesn't want to work properly. I started to work with the older template but I need the new version due to proper support for landscape in windows phone 8 that we need to utilize for our game.
Now is my question if someone knows the right/proper way to do this. A short summing up from what to copy where will do.
Thanks in advance.
Okay it took me some time but I figured out what to copy,build,set and run.
You download the .Zip or make a pull with your Github into an empty folder and when finished extract it.
In the map open the MonoGame.Framework or MonoGame.Framework.”your
target platform” which will startup visual studio.
Build the solution/project (don’t forget to build in ARM, x86 and
x64 if enabled and needed) and navigate to “Extracted
folder”/MonoGame.Framework/bin/”your targeted platform” at the same
time open a new explorer and navigate to your MonoGame installation
by default C:\Program Files (x86)\MonoGame\v3.0
Navigate in your extracted folder to your targeted platform and
build and copy the MonoGame.Framework.dll to the opposing C:\Program
Files (x86)\MonoGame\v3.0\Assemblies\”targeted platform”\”build”
Rebuild your Project/Solution
Gratz you now updated your MonoGame :)
This could fix your problem but it’s possible that you still get an error when initializing your app on your phone or emulator DXGI related.
If this occurs then follow these steps. The problem lies probably by your SharpDX.WP8.dll how to fix this? In my case download and install the newest SharpDX http://sharpdx.org/download/ you could also look further how to only download the SharpDX.WP8.dll & .winmd!
Navigate to your SharpDX install (by default C:\Program Files
(x86)\SharpDX) navigate further to
Bin\DirectX11_1-“platform”-“build”\ and copy the SharpDX.WP8.dll and
.winmd to C:\Program Files
(x86)\MonoGame\v3.0\Assemblies\WindowsPhone\”build”
Rebuild your Project/Solution (if this still doesn't work you may
need to manually add the references again to SharpDX.WP8.winmd for
both builds)
So if it’s alright this should fix most issues but there is one left. Between MonoGame 3.0.x and 3.2 the project template of a windows phone game has changed but this didn't went well in the code. So we’re now going to update the project template of our Visual Studio.
Go back to your extracted Monogame map and head into the folder
“ProjectTemplates”\”your visual studio version”\WindowsPhone
Select all files and create a .Zip (could be done by the integrated
windows option “Send To”) make sure when you open the .Zip you will
immediately see all the files and they aren't nested into a folder
inside the .Zip
Navigate to C:\Users\”your PC name”\Documents\Visual Studio
201X\Templates\ProjectTemplates\Visual C#\MonoGame and copy your
just created .Zip and overwrite the existing file.
You may have to follow these steps if you use different version of Visual Studio because of the lack of support for XNA inside VS2013.
Now you should've fixed any possible problem. If your project still gives errors try to recreate a new one (this would now use the new updated template you just copy pasted and would work) If this still doesn't work than please post what goes wrong but this all should do! These instructions should also work for all other platforms (at least which you could build of course)
Pretty easy to do pull it in to your own version.
Follow these steps:
Fork the Monogame repository
Clone your version to your local machine
Find the repository of the fixed code.
In a command prompt, move to your MonoGame folder, and pull the changes in using this line on your machine. (the branch is most likely master)
git pull http://github.com/other/repo branch_name
Once you have the pull request pulled into your local branch, just build it using Visual Studio.
You can also follow these steps if you think you'll be doing this often.
https://help.github.com/articles/syncing-a-fork
For some reason MrME, I couldn't get your solution to work because of some missing SharpDX reference which REFUSED to be added manually. While your solution may be valid I would like to present an alternative if you have the patience to transfer the code to a Monogame 3.2 project and are still getting the black screen:
Set the DrawingSurface to a DrawingSurfaceBackgroundGrid in the GamePage.xaml. Full details are found in the commented explanation at the bottom of the GamePage.xaml file.
Source: https://github.com/mono/MonoGame/issues/2081