Unable to build Spartacus 4.3 after installation - spartacus-storefront

Unable to build Spartacus 4.3 after installation. Got lot of this errors:
node_modules/#spartacus/asm/asm.module.d.ts:6:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
6 static ɵfac: i0.ɵɵFactoryDeclaration<AsmModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/#spartacus/asm/asm.module.d.ts:7:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
7 static ɵmod: i0.ɵɵNgModuleDeclaration<AsmModule, never, [typeof i1.AsmComponentsModule, typeof i2.AsmCoreModule, typeof i3.AsmOccModule], never>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/#spartacus/asm/asm.module.d.ts:8:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
8 static ɵinj: i0.ɵɵInjectorDeclaration<AsmModule>;
~~~~~~~~~~~~~~~~~~~~~

Recommended way to install Spartacus is to use Schematics. Spartacus schematics allow you to install Spartacus libraries in your project.
But before, please ensure that yours Angular project meets with specific prerequisites (Angular CLI, Node.js and Yarn version):
https://sap.github.io/spartacus-docs/schematics/#prerequisites
You can also try to remove node_modules folder and install all dependencies once again.

Related

compile errors after upgrading to latest CRA

I just updated to latest create-react-app (web pack 5). And am now getting the following errors (I'm just showing the first 2 errors here). Any help explaining what this error means and how to fix it would be greatly appreciated. I don't think the problem is with react-pdf because I created a new create-react-app project that uses that package and there's no problem.
{
Compiled with problems:X
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/inherits.js 1:0-46
Module not found: Error: Can't resolve './setPrototypeOf' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'setPrototypeOf.js'?
BREAKING CHANGE: The request './setPrototypeOf' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/objectWithoutProperties.js 1:0-74
Module not found: Error: Can't resolve './objectWithoutPropertiesLoose' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'objectWithoutPropertiesLoose.js'?
BREAKING CHANGE: The request './objectWithoutPropertiesLoose' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
}
Somehow I was accessing a wrong version of babel after CRA upgrade to 5. Deleting node_modules and re-installing was not enough. I needed to delete node_modules and yarn.lock and then yarn install - and then all was ok.

Error building Angular Library : Cannot read property 'toString' of undefined

I have created a custom library to be used in my main angular application...
However, when I try to build the library using ng build lib-name I am getting the error:
**Cannot read property 'toString' of undefined**.
I could not find an exact solution to get rid of this error.
Any suggested actions?
Some reference information:
Angular CLI: 8.3.5
Node: 10.16.3
OS: win32 x64
Angular:
...
Package Version
#angular-devkit/architect 0.803.5
#angular-devkit/core 8.3.5
#angular-devkit/schematics 8.3.5
#schematics/angular 8.3.5
#schematics/update 0.803.5
rxjs 6.4.0
For me, I get this because I prefer inline templates and styles but I forget to include -s -t flags when using ng generate (especially in lib projects where the global inline settings in angular.json don't seem to stick?).
After I do an ng generate I delete the foo.html and foo.scss files to avoid going into a trance while alt-tabbing 20 times in 5 seconds.
Then, I change templateUrl to template: <p>foo works</p> (note: replace the single quotes from the url string with the template's tickmarks).
I then often forget to change the styleUrl['foo.scss'] to styles:[``] and then this error message pops up. This is quite a lame error message from a great tool but I thinks it has something to do with the opacity of webpack.

Field not found: 'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'

i recently have been using Nancy fx and i'm in love with it, but when i try to make a structuremap ioc like the documentation page suggested i get the error
Field not found: 'Nancy.Bootstrapper.NancyBootstrapperLocator.Bootstrapper'.
i have override the getApplicationContainer function like shown in the file
https://github.com/CarlosBolanos/apadrina/blob/master/Application/Bootstrapper.cs
but still get the same error, i look on the code on the rnancy repository
https://github.com/NancyFx/Nancy.Bootstrappers.StructureMap/blob/master/src/Nancy.Bootstrappers.StructureMap/StructureMapNancyBootstrapper.cs
and i cant see the bootstrapper property
does any1 else have this error too i've been trying to set this up for hours,
if i remove the nancystructuremap in nugget the error goes away.
or do i need to set something else on the bootstrap class.
I ran into this scenario after installing Nancy.Bootstrappers.Ninject from Nuget. My Nancy project was created using the Nancy Visual Studio templates, and were referencing Nancy 0.21.1.
What I found was installing the bootstrapper package caused the base Nancy package to get upgraded from 0.21.1 to 0.23.2. This is fine, except that the Nancy.Hosting.Aspnet and the Razor engine packages were NOT upgraded from 0.21.1.
To fix the error, I had to update all of the Nancy-related packages I was using to match the 0.23.2 package.

Unable to use apache-ldap-api with grails 2.2

I am trying to use apache-ldap-api with grails 2.2 . The latest version of the api on their website is 1.0.0-M15 , but maven repo has upto 1.0.0-M13 . So I decided to use M13 first by adding a dependency to BuildConfig.groovy:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime(
[group: 'org.apache.directory.shared', name: 'apache-ldap-api', version: '1.0.0-M13']
)
// runtime 'mysql:mysql-connector-java:5.1.20'
}
Grails downloaded the dependency alright, but when I try to use the API in the code such as:
import org.apache.directory.groovyldap.LDAP
LDAP.newInstance(...)
I get a compile error :
LdapController.groovy: 2: unable to resolve class org.apache.directory.groovyldap.LDAP
# line 2, column 1.
import org.apache.directory.groovyldap.LDAP
^
1 error
The compiler lets me import 'org.apache.directory.groovyldap.*' but then again, the call to 'LDAP.newInstance()' throws an exception.
I also tried manually dropping the 1.0.0-M15 version in my /lib folder and running 'grails compile --refresh-dependencies' without any luck. Any ideas if I am doing something wrong here?
Thanks!
1 run this grails compile --refresh-dependencies
2 change LDAP.newInstance(...) into new LDAP
This is how it works for me

Error Deploying portlets

I am trying to setup some boiler plate code in my local workspace which uses weblogic10.3. I have a documentation that asks me to import Content.jar from /wlportal_10.3/content-mgmt/lib into window->preferences-->Weblogic-->Shared Library which I did. However when I try to deploy portlet this is the error am getting
Error Deployer BEA-149107 An attempt was made to deploy library 'content' with specified specification version '10.3.2' and implementation version '10.3.2 '. However, the library manifest has specification version '10.3.2' and implementation version '10.3.2'