error when building newly initialized addon - ember.js

After I had troubles building/serving an addon I'm working at, I did the usual steps to heal (delete node_modules, npm clean, npm install, ...) with no success.
So finally I'm at the stage where I newly created a fresh addon via ember addon jeff-table to port the 'old' not working repo to there....
Addon-creation was successful:
installing addon
create .bowerrc
....
create .npmignore
Successfully initialized git.
Installed packages for tooling via npm.
Installed browser packages via Bower.
Anyway, again I get the same errors when trying to build the untouched addon:
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
at EmberAddon.EmberApp._initVendorFiles (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:317:55)
at EmberAddon.EmberApp [as appConstructor] (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-app.js:94:8)
at new EmberAddon (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\broccoli\ember-addon.js:38:8)
at module.exports (C:\users\jefff\google drive\www\ember-addons\jeff-table\ember-cli-build.js:6:13)
at Class.module.exports.Task.extend.setupBroccoliBuilder (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:55:
19)
at Class.module.exports.Task.extend.init (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\models\builder.js:89:10)
at new Class (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\node_modules\core-object\core-object.js:18:12)
at Class.module.exports.Task.extend.run (C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at C:\users\jefff\google drive\www\ember-addons\jeff-table\node_modules\ember-cli\lib\commands\serve.js:64:24
I suspected GDrive to have messed up my node_modules or smth, but on a fresh installation this could not be the case (with GDrive switched of).
I have not touched installation of ember-cli (not that I know of).
Does anybody have an idea of what could be wrong here?
ember-cli: 2.5.0
node: 4.2.2
os: win32 x64

Try setting a lodash dependency in your package.json to a version older than 4.17.0. It's a dependency of ember-cli and was updated last night. I had the same error and stack trace with one of my company's projects this morning, it compiled last night in the CI system but failed this morning with no changes to the project. I compared the downloaded dependencies, and a couple had new versions. The first difference was lodash, so I added the 4.16.6 version to my package.json (the version that worked last night) and my project compiled again.
I'm still a novice when it comes to Node, so there may be a better solution, but this isn't the first time I was able to resolve a compilation break by forcing npm to get an older version of a dependency.

the same issue hit my projects as well.
#Bloomy you are right,
error comes from here
/node_modules/ember-cli/lib/broccoli/ember-app.js:317:55
by short debugging it appear that the issue with accessing a property from an object which isn't exist, because, as I guess, lodash 'avoid deep cloning of ._omit result' https://github.com/lodash/lodash/commit/6c427b7a260183685b16d2624351529cda25ce81 .
If you will put version of lodash in ember-cli to some version which goes before (just for your local version) - you will see it works. Not possible for production yet. Going to open a ticket in ember-cli addon if isn't opened yet :)

I was also facing the same issue and raised the following issue in github
https://github.com/ember-cli/ember-cli/issues/6432
And found out that the recent release of lodash i.e. lodash#4.17.0 has a little bug in it which is breaking things. So till a patch is released, try using lodash#4.16.5, this should solve your problem for now.

Related

I simply want to upload a new build to an existing version. Keep getting ERROR ITMS-90062

I am trying to understand why I keep getting this error.
ERROR ITMS-90062: "This bundle is invalid. The value for key CFBundleShortVersionString [0.0.2] in the Info.plist file must contain a higher version than that of the previously approved version [3.11]. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring"
Although we are building our app using Ionic / Cordova, the actual app is built using Xcode.
In Xcode 11.5, it is clearly marked as:
- Version: 3.11
- Build: 0.0.1
and when I go to AppStore Connect -> Activity, the current version that is marked as "Ready for Sale" is:
- Version 3.11
- Build 0.0.1
To me, it should be a simple process. It I have a small fix, I want this to be Version 3.11, Build 0.0.2
'Version' is for major fixes/new features, and 'Build' is for minor fixes (typos, color changes, other aesthetics).
Yes, when I try to upload Version 3.11, Build 0.0.2 to the Appstore Connect, I get the ERROR ITMS-90062.
Any advice? I really don't know what I am doing wrong.
Derek
Resolved! The lightbulb went off :)
Each approved app must have a new, increasing Version Number.
We can upload multiple builds to App Store Connect (and TestFlight), each with an increasing Build Number, for any Version Number. Only when testing is complete, then we submit one of those Builds for approval..and hence a new version bump.

Detected package downgrade: Microsoft.EntityFrameworkCore.SqlServer from 2.2.6 to 2.2.4

I have an ASP.NET Core Web API Application, I was instructed to update the NuGet Packages, once I started upgrading, NuGet started throwing errors about missing dependencies, after going one by one (one depends on other that was not installed and that one depends from another 2 that were not installed and so it goes); I encountered the following error where I got stuck:
Detected package downgrade: Microsoft.EntityFrameworkCore.SqlServer from 2.2.6 to 2.2.4. Reference the package directly from the project to select a different version.
Below that error I see that "Install a Reference to Microsoft.EntityFrameworkCore.Abstractions 2.2.6 to solve the issue"
But when I try to do that, it throws:
"Version conflict detected, Install a Reference to Microsoft.EntityFrameworkCore 2.2.6 to solve this issue"
Of course this is a circular error is not giving me options, I tried to install version 2.2.4 and threw the same conflict error (but related to version 2.2.3 and so on).
This is Visual Studio Enterprise 2017, ASP.NET Core 2.1
I already tried adding true
To the .cproj file and did not work at all
I think you've gone down a rabbit hole here. The exception, in general, just means that your project is getting two references for the same package and one of those references is to a lesser version. That could happen for any number of reasons, but it generally boils down to two possibilities (or a combination of the two):
You've got different metapackages that reference the same package, and the metapackage versions are mismatched.
You've got one or more project dependencies, and those dependent project(s) use different versions of the same package/metapackage.
The stuff about "install a reference to Microsoft.EntityFrameworkCore.Abstractions" are usually red herrings. It's calling out the specific package reference version mismatch, but that doesn't mean that literally installing that package is the best approach.
The big thing is going to be metapackages, as these are basically just multiple packages rolled into one reference. The actual underlying packages and their versions are not directly referenced, but they're there, just as if you'd directly added the reference. As such, it's not always clear that two separate metapackages are actually using one or more of the same packages under the hood.
The best course at this point is to rollback your package reference changes. You've probably introduced more problems than you've solved. Remove any extraneous or superfluous references. For example, if you've got a reference to both Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Abstractions, remove Abtractions. It's easiest to do this by directly editing the .csproj file. Go project by project in your solution and pare back packages to only the ones absolutely necessary for your project(s). Hint: if you start seeing red squigglies in your code, you actually needed that one.
Once you've done this, upgrade all the NuGet packages for the entire solution all at once. Literally, right-click the solution and choose "Manage NuGet packages for the Solution". You should also check the "Consolidate" tab and ensure that there's nothing there, i.e. you're running the same versions of everything across all projects. Then, you should be good to go.

ExtensionsMetadataGenerator error when upgrading Azure Functions SDK

I upgraded my azure function sdk from 1.0.14 to 1.0.28 and I get this build error:
The ExtensionsMetadataGenerator package was not imported correctly.
I can't find any documentation or ways to resolve it.
According to the 1.0.28 function sdk released several day ago, it may have some bugs in it.
Workaround:
Manually adding the
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator nuget package to your project and it will work well.
I got this error when starting with the Visual Studio Function App template which uses Microsoft.NET.Sdk.Functions 1.0.31 and is a .NET Core 2.0 App.
Nuget Package Manager wants to update the Microsoft.NET.Sdk.Functions package to version 3.0.2 which it tries to do but the app is still .NET Core 2 and you get the error:
The ExtensionsMetadataGenerator package was not imported correctly.
To resolve this update the application to .NET Core 3:
Make sure you update your Microsoft.NET.Sdk.Functions NuGet package to the newest version that supports your app's version of .NET.
For example, I have a web app running .NET 2.1, I had to rollback the NuGet version to 1.0.36, and the next version (3.0) only worked on .NET 3 and up. After doing this, Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator NuGet was not needed at all and all my errors were gone.
I am working with microsoft.net.sdk.functions 1.0.38 and see the same message but in my case it is a build warning and not an error.
I installed the suggested NuGet package with the version required. However, I then received 3 warnings:
The ExtensionsMetadataGenerator package was not imported correctly. Are you missing 'C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets' or 'C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.props'? "C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.props" cannot be imported again. It was already imported at "C:\Users\me\.nuget\packages\microsoft.net.sdk.functions\1.0.38\build\Microsoft.NET.Sdk.Functions.props (56,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\myproject.Web\myproject.Web.AzureFunctions\myproject.Web.AzureFunctions.csproj] "C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets" cannot be imported again. It was already imported at "C:\Users\me\.nuget\packages\microsoft.net.sdk.functions\1.0.38\build\Microsoft.NET.Sdk.Functions.targets (64,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\myproject.Web\myproject.Web.AzureFunctions\myproject.Web.AzureFunctions.csproj]
Worse still my project would not build - it freezes on build with no way to cancel. The only way to cancel was to do, elevated PowerShell:
stop-process -name "dotnet"
To fix this I tried uninstalling the NuGet package but this is not enough as it still seems to be used if it is on the system (even though the project does not reference it?!?).
It is necessary to actually delete the package from package store, i.e. at.
C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator
Or an alternative is to comment out the lines:
<GenerateFunctionsExtensionsMetadata SourcePath="$(_FunctionsExtensionsDir)" OutputPath="$(_FunctionsExtensionsDir)"/>
From:
C:\Users\me\.nuget\packages\microsoft.azure.webjobs.script.extensionsmetadatagenerator\1.2.0\build\Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.targets
I have no idea if this is safe to do so but it gets rid of the warning message. I instead opted to just delete the NuGet package and live with the original warning.
Looks like a real mess with microsoft.net.sdk.functions package.

VS2017 RC1 Installation installation error - Microsoft.PortableLibrary.TargetingPack.Msi failed - No XAML

I had errors installing VS2017 with
Package 'Microsoft.PortableLibrary.TargetingPack.Msi,version=15.0.26004.1' failed to install
The actual IDE will open but I don't have any XAML functionality - it appeared to fail the installation before this component was installed. XAML files won't load and there is no XAML listed under 'Text Editor'.
How to fix this error?
After several hours finally managed to get it to work:
Still not sure exactly what a targeting pack is - and why VS couldn't install it but I manually installed this package and managed to get it to work:
Manually installed:
Microsoft .NET Framework 4.6.2 Developer Pack and Language Packs
https://www.microsoft.com/en-us/download/details.aspx?id=53321
Other things I did that may have contributed to the solution:
I rebooted
I removed all files in C:\ProgramData\Microsoft\VisualStudio\Packages - actually I moved them to an OLD folder and later deleted them. You will see packages downloaded here after you restart the install.
I had previously created a symbolic link from %ProgramData%\Package Cache to another drive to save space (https://superuser.com/questions/455853/can-i-delete-the-folder-c-programdata-package-cache). This symbolic link didn't seem to work anymore leaving me with some files in %ProgramData%\Package Cache and the rest in the other drive. I moved them over and recreated the link. If this is something you did to save disk space and forgot then that could contribute towards a failed solution.
Something above fixed the issue and I now have XAML back again.
Note: The VS2017 RC1 does not support offline installation so that was another avenue I explored and gave up on. The command line switches currently do NOTHING.
I believe the package I needed is the following one but not absolutely sure.
C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.PortableLibrary.TargetingPack.Msi,version=15.0.25719.0

Cocosmotion cloned from github repository does not work

I cloned cocosmotion repository from github, but I can't get it to work. I am almost totally new to mac os, xcode and iOS development, so there can be things that I am missing right now).
I have XCode 4.5 installed, downloaded cocos2d and installed it's template so that now I can create cocos2d projects from templates. Also I bought RubyMotion and RubyMine with it;s support, but demo project from github does not compile with the following error:
/Users/DarkDeny/.rvm/rubies/ruby-1.9.3-p327/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/DarkDeny/.rvm/gems/ruby-1.9.3-p327/bin/rake simulator
Build ./build/iPhoneSimulator-6.0-Development
Build vendor/cocos2d-iphone
ERROR! Building vendor project vendor/cocos2d-iphone' failed to create at least one.a' library.
Process finished with exit code 1
I tried to compare cocos2d which I downloaded by myself from it's site, found that resources are missing, after adding them to cocos2d folder structure. I got XCode compiling cocos2d within cocosmotion-master folder to compile successfully, but rubymotion project still reports the same error from above.
What am I missing? What could be the root cause of the problem?
It is better to start from scratch and use cocoapods with RubyMotion. This will definitely work as I was able to check. cocosmotion repo from github is deprecated since there is a pod of cocos2d from its' creators.