I have installed OroCRM 4.1 version.The requirejs bundle doesn't seem to have loaded. I checked the bundles folder and i do not see the ororequirejs folder there, which was present in the previous version (4.0). Because of this the custom extension i have that uses require to include js files are failing. I tried php bin/console oro:requirejs:build command but its failing with the messsage There are no commands defined in the "oro:requirejs" namespace. Can someone help me fix this issue?
RequireJsBundle is not available in OroCRM 4.1, as an application migrated to the webpack build.
Please, follow the migration guide referenced from CHANGELOG.md:
https://github.com/oroinc/platform/blob/master/CHANGELOG.md#requirejsbundle
Related
I upgraded my app to Angular cli ^11.0.2 recently, from then my HTML and SCSS changes are not compiled on save even when ng serve is running. I have to save the respective ts file to get the html changes compile. I saw a related issue on Github with no proper solution(Here). Is this because of ivy engine ? or Did I miss any update on any particular npm package?
This seemed to happen due to default Ivy engine configuration with Angular 11.
I disabled the enableIvy flag in tsconfig.json file like this :
"angularCompilerOptions": { "enableIvy": false, "allowEmptyCodegenFiles": true }
A friend suggested that AOT with ivy configuration must be avoided in dev environment to avoid this kind of issues.
I am having a problem with the deployment of an angular app. It does not occur on another machine if deployed. My app is not running and it shows the following error on Chrome:
Not allowed to load local resource
and in Mozilla:
'src' attribute of element is not a valid URI
The thing is, it is working completely fine if deployed from other machines. So I am guessing the issue is with the versions of node or typescript or ng or whatsoever. I am new to server deployment and this kind of issue is new to me.
I am using following command to generate the deployment folder:
ng build --prod --base-href /candidate/
Following is my version details:
Node version: v10.16.3
Application typescirpt version: Version 2.9.2
Globally installed typescript version on the machine: Version 3.6.3
I deleted node modules and package-lock.json file and run npm install before production build. I got no error and was successfully able to generate dist folder.
The deployment folder works perfectly if it is deployed from machines which have upgraded or downgraded node version installed.
I have found many suggestions regarding the error shown on the browser, tried upgrading the node global versions but there is no way around. I am quite unsure about what I am missing here. Any kind of heads up would be great in this situation.
After digging into deep I found out that the problem is not with the version rather with the base URL it is generating in index.html file after build.
This issue occurs when using git-bash on Windows.
The git-bash sees the last argument of the command- ng build --prod --base-href /candidate/ as a path relative to its binary folder and prepends the argument with that (it converts the "seems-to-be" relative path into an absolute path).
So, I used PowerShell instead of Git-Bash and the issue was gone. The base-href parameter is handled fine there.
To resolve the issue with git-bash go through this link, which actually helped me to resolved my particular issue.
You should control base tag in index.html in dist folder.
<base href="/">
I have Angular4 integrated with Visual Studio 2017 using this article.
I also use Nodejs 8.6.0 and npm 5.4.2 (the latest versions at this time).
vs2017 generated a folder named node_modules and all the sub folders/files without caching any error.
But node_modules/systemjs folder does not exist in it. It's been called in <header> tag like this: <script src="node_modules/systemjs/dist/system.src.js"></script>. which result to 404 Not Found page.
I also create an angular from the ground up without VS2017 and it works like a charm! It doesn't have node_modules/systemjs folder either, but it works!!!
What is happening? And how should i bring this folder back? Does it related to the Angular2 and is not supported in Angular4?
There are two libraries for loading modules for Angular: systemJS and Webpack. Depending on which technique you use to build your application, you will use one or the other.
For example, if you use the Angular CLI, it uses Webpack and you won't see systemJS in your project.
If you use the latest dotnet new angular for VS 2017, it uses Webpack as well.
If you build your application following the angular.io documentation, it uses systemJS.
We are currently trying to setup an Angular 2 project that also contains a Cloud Service project in its solution. We have set up numerous Angular 1 projects containing Cloud Service projects and have had no errors. When trying to run the MSBuild step for the Angular 2 project, we get the following error on the TeamCity build server:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.7\Microsoft.WindowsAzure.targets(2787, 5): error MSB3021: Unable to copy file "C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs" to "C:\SourceControlFolder\Apps\MyApp\MyApp.CloudDeployment\obj\Debug\Website\C:\TeamCityBuildAgent\temp\buildTmp\.NETFramework,Version=v4.6.1.AssemblyAttributes.cs". The given path's format is not supported.
The main problem seems to be the build attempting to throw the full C:\TeamCityBuildAgent.. path into the obj\Debug\Website folder.
My current MSBuild parameters are:
/p:Configuration="Dev"
/p:platform="Any CPU"
/p:OctoPackEnforceAddingFiles=true
/p:OctoPackProjectName=MyApp_Dev
I've tried the following solutions:
Making sure the latest Visual Studio Update is installed (for MSBuild)
Running the install tool to repair Azure Tools 2.7 on the build server.
Changing the debug configuration in the build.
Ensuring TypeScript 1.7.6 is installed on the build server (even though it's an Azure.targets issue) [https://github.com/Microsoft/TypeScript/issues/6215]
Updated the project to Azure Tools 2.9. The same error remains except it's failing on the 2.9 folder instead now.
Curious if anyone else has experienced this error and knows a fix. I'll keep this post updated as I try other solutions.
Update
It appears that what is causing this issue is this line within the .csproj file:
<FilesToIncludeForPublish>AllFilesInProjectFolder</FilesToIncludeForPublish>
This is specified for our build configurations to copy all files generated by the ng build to the output directory of the publish. What I don't understand at the moment is how this works on all of the devs' local machines but does not work on our build server. Will keep this posted as I find more info or any kind of workaround.
This ended up being the fix:
Instead of targeting the .sln in MSBuild, we specifically targeted the .csproj file. This fixed the build errors and allowed us to keep the FilesToIncludeForPublish tag inside.
So I have created a pretty default keystoneJS project and the first error that appeared was that when ran locally the website's default css won't load.
It's looking for site.min.css but in the folder there is only site.scss
After I compiled the scss via sublime text 2 sublimeBuild and renamed the file to site.min.css (from site.css) it ran perfectly but what worries me is why does the default installation have this error.
Where should I change this? Is there an scss builder included so I have to change folder naming or is there some other issue?
My guess is that it has something to do with some step skipped. I remember the keystone installation asked me whether I wanted to use sass so I suppose everything should be ok.
Is the problem because I did not use grunt somehow?
I recall reading somewhere that this grunt tool has to be used instead of node when running a server and I see a Gruntfile in my folder but when installed grunt-cli the grunt just loads and terminates the server right after that.
You don't have to do anything, sass-middleware is included and automatically generates CSS files from your SASS source files when they're requested.
The issue you were experiencing with site.min.css not being found was an error in the yeoman generator, from when the SASS support was added. The LESS middleware automatically compresses generated CSS when a request is made for a file ending in .min.css, but the SASS middleware doesn't do the same, so the request was 404'ing.
The problem with the yeoman generator has been fixed as of version 0.2.9, for existing projects the simple fix is to change your layout file so it refers to site.css instead of site.min.css.
Once you do that the middleware will automatically detect the presence of site.scss and generate an up-to-date version of site.css for you.