I am trying to deploy a .NET-MVC-application to Azure via Github, but deployment fails with the following error message. What could be the reason for that? It works locally.
WebCompiler: Begin compiling compilerconfig.json
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0: The system cannot find the path specified. [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
D:\home\site\repository\src\BeYourMarket.Web\Themes\Default\Content\theme.less : WebCompiler error 0: [D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj]
WebCompiler: Done compiling compilerconfig.json
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\src\BeYourMarket.Web\BeYourMarket.Web.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d34cc45ff19d01";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository\src\\"
An error has occurred during web site deployment
Thank you in advance for any tipps and hints!
This is a current open issue with WebCompiler project. The Azure file system is locked down in ways that your local environment are not. Even though the file exists at the path on the server, the deployment script cannot read it.
In scanning the comments on the Issue (https://github.com/madskristensen/WebCompiler/issues/146), there doesn't seem to be a solution at this time except to pre-compile your CSS and include it in your repository.
In the end I dealt with it the following way:
Install package LessMsbuildTasks
Remove the file (in my case theme.less) from webcompile (right click on that file: Web Compiler - Remove file)
Add Dotless as build action for that file (right click on that file: Properties - Build action)
Commit changes and push
The next two steps are optional:
Put compilerconfig.json on .gitignore
Add that file to Web compiler again (right click on that file: Web Compiler - Compile file)
That way I can still use the constant compiling to develop and push it to my repository to initiate CI on Azure.
Related
I am trying to deploying my website on Netlify from my GitHub.
However I am stuck to the following error:
11:37:19 AM: failed during stage 'deploying site': Invalid filename 'node_modules/es5-ext/date/#/format.js'. Deployed filenames cannot contain # or ? characters
I tried to delete and upgrade the module es5-ext but the error persists.
I don't know if i'm too late to this but I just ran into this issues
here's what I did which fixed my issues
base directory : yourApps
build command : CI= npm run build
publish directory : yourApps/build
I used craco in my react apps because I needed it to work with Tailwind css , I don't know if this will work for you , but that solution worked for me
My first answer is a question: Why are you deploying your node_modules folder? That is generally not needed on static websites: they're used to build the site, but then not needed at runtime, since, well, "runtime" is just "send this file" not "run this code" on the Netlify CDN server. Perhaps you've set your "publish directory" wrong in the site's build & deploy settings and are deploying your source code too, rather than just the finished build?
In case you do for some reason need to deploy node_modules for some reason, you can in general do so. The message is quite clear - don't send filenames with # or ? in them. Those are not valid filenames per the HTTP spec - # is for designating anchors, and everything after the # is used client-side and thus won't map correctly to your file. ? is for denoting query string parameters and similarly won't work as you're intending to read the file whose name contains ? but rather cutting off the filename that the server will (attempt to) serve, before the ? character.
My question is, how should my Erlang app reliably find a binary in the priv directory, not just in production; when installed properly, but during common test?
I realised today when I added a travis-ci configuration to an old Erlang app and pushed it to git-hub, that the process by which it works locally for me, is a little more fragile than I thought. The travis-ci build failed because it, not unreasonably, checked out my repo into a directory named after the repo, which is of the form erlang-APP. Locally my app is in a directory called APP-VSN though.
The result of this is that a call to code:lib_dir(APP) returns a correct result during the common test run locally, but if I rename my current directory to erlang-APP instead of APP-VSN (or just APP works too) my local build fails, just like it does for travis-ci, because code:lib_dir(APP) returns {error,bad_name}. The behaviour as though .. is added to the library path for rebar ct.
Renaming my github repo from erlang-APP to APP resolves the travis-ci build failure... but knowing the build tests only pass depending on the name of the directory the repo is checked out into doesn't sit right with me.
One way could be to use a soft link (either in the repo under version control, or created when initializing the tests), and make your Erlang code path go via the link. E.g., "./APP" -> ".", or "./lib/APP" -> "..".
I'm trying to reference FakeLib.dll from my local Fake.Deploy installation in my deployment script but can't seem to find the correct path to use. I found that Environment.CurrentDirectory points to my Fake.Deploy installation, but just using
#r #"FakeLib.dll"
doesn't work:
Deploy messages
{
2015-05-12 09::22:50.413
2015-05-12 09::22:50.417
2015-05-12 09::22:50.417 Install.fsx(2,1): error FS0082: Could not resolve this reference. Could not locate the assembly "FakeLib.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)
2015-05-12 09::22:50.432
2015-05-12 09::22:50.432
2015-05-12 09::22:50.433 Install.fsx(2,1): error FS0084: Assembly reference 'FakeLib.dll' was not found or is invalid
}
Examples I found on the web suggest to deploy FAKE along with my application in the NuGet package and reference it like this:
#r #"tools\FAKE\tools\FakeLib.dll"
but this seems like overkill and an unnecessary reference.
Does anyone know what path to use to reference the local Fake.Deploy installation?
Just found the answer myself: the base directory used for references in the post-deployment fsx script is __SOURCE_DIRECTORY__, the directory of the deployment itself.
So assuming your Fake.Deploy is installed in
.\Fake.Deploy\
then Environment.CurrentDirectory will point to this directory, whereas __SOURCE_DIRECTORY__ will point to
.\Fake.Deploy\deployments\\{your_app}\active
So you can reference FakeLib.dll from your post-deployment fsx script as follows:
#r #"..\..\..\FakeLib.dll"
I will try to get this added to the documentation page.
That being said, there are in fact points to be made for deploying FAKE together with your application:
It makes sure the correct version is used to run your deployment script
The Fake.Deploy installation might not be be under your control, so you could be prevented permission-wise from accessing its binaries
The configuration of Fake.Deploy allows to specify a different deplyoment location (via "WorkDirectory"), so this hardcoded path will break when using a non-default location
Note that when your NuGet package is sent over via Fake.Deploy, the agent runs the script in the root of the package from the same folder as the fake executable. So, when your fake.exe is in C:\Fake\tools\fake.exe, your files are in C:\Fake\tools\deployments\YourApplication\active. If you need to read a properties file or something from that directory, your script won't see it. So, you'll need to do the following in your script:
open System
open System.IO
let arguments = System.Environment.GetCommandLineArgs()
let script = arguments.[1]
let scriptDirectory = script.Replace(#"\NameOfMyDeployScript.fsx", #"")
System.IO.Directory.SetCurrentDirectory(scriptDirectory)
I wanted to put that out there so no one loses their mind over trying to access some file. You'll see an error like this if you don't change directories:
System.IO.FileNotFoundException: Could not find file 'C:\Fake\tools\myfile.properties'
Up until now I've been using Xcode with Subversion for my code repositories with no problem. Now I'm working on a project that uses a Git repository stored at GitHub, so I figured I'd go clone that repository to my local machine and get started.
In Xcode, I add the repository then tell it to Clone -- The machine chews on this for a while, and if I use the Finder I can see the files being placed in the target directory (which is a newly-created, empty directory on my system). After a while though, I get an error message:
fatal: destination path '/Users/myname/Documents/ProjectName' already exists and is not an empty directory.
I have tried this three times now, each time starting with an empty target directory, and it gives the same error message each time, so I know it has to be something I am doing wrong, or have not set up properly.
Thinking that perhaps something was going wrong and the system was trying to do a second clone operation (to a now non-empty directory) I tried canceling and trying a build, but some files are missing from the project -- so not all of it made it down to my system.
My searches on this issue turn up several hits for people doing the clone via command line and showing this error message, but not through the Xcode interface.
Does anyone have any suggestions about what might be going wrong?
I am currently working out how best to go about syncing files in my folders which will be included in my installer.
It works fine through the interface, but doesn't seem to work out well when doing it through the command line.
My folder structure is essentially:
Root
Installer Config
My code 1
My code 2
My installer is to set up my two code folders when installed. Like I mentioned, I have this set up working for building the installer through the interface.
In my project, I have My code 1 and My code 2 folders set as sync folders in the Files and Folders section.
In the Installer Config folder, I am running a couple of scripts which essentially boil down to a batch file which does:
"AdvancedInstaller.com" /loadpathvars PathVariables.xml
"AdvancedInstaller.com" /execute myproject.aip commands.txt
and my commands.txt which does:
;aic
ResetSync APPDIR\mycode1
ResetSync APPDIR\mycode2
Save
Rebuild
When the ResetSync calls are made, I get the error: Folder not synchronized: APPDIR\mycode1. but when I just hit refresh in the Files and Folders section in interface, it works fine.
To create this error I add a new file to the 'My code 1' folder. Run the scripts, and I get the 'Folder not synchronized' error.
Solved on Advanced Installer forums.