Hello, my project is based on an Angular2 + ap net core template downloaded on september last year. I haven't updated frontend for a while. After few months I tried to run angular frontend on another computer.
After getting the sources from repo I run yarn commnad with following error
[email protected]: The engine "node" is incompatible with this module. Expected version "> 0.4.x < 0.9.0".
The complete error is in (yarn-start-error) section bellow. I tried to instal older nodejs but it didn't work with yarn which I can't find suitable version of anywhere.
I found a solution that suggested to run yarn --ignore-engines. That finished succesfully, but when npm start command is invoked an error concerning moment package
Property 'tz' does not exist on type 'typeof moment'.
.
These errors could not be reproduced on the original machine. Everything somehow work perfectly. Both stations uses the latest version of nodejs and yarn. I am not sure about typescrip version since it could break anything.
Can you help me to build this solution? I don't mind any upgrade as long as it does not require to rewrite code or move files across solutions with different version ( e.g. to download new version of framework and transfer all business logic.) Is there any way to achieve this?
I am willing to share the angular frontend with you using some private channel if you want.
Thank you for reply
yarn-start-error yarn install v1.6.0 warning package.json: "dependencies" has dependency "codelyzer" with range "^2.1.1" that collides with a dependency in "devDependencies" of the same name with version "~3.1.2" warning package.json: "dependencies" has dependency "jasmine-spec-reporter" with range "^3.3.0" that collides with a dependency in "devDependencies" of the same name with version "~4.2.1" warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm</a> for more information. warning [email protected]: "dependencies" has dependency "codelyzer" with range "^2.1.1" that collides with a dependency in "devDependencies" of the same name with version "~3.1.2" warning [email protected]: "dependencies" has dependency "jasmine-spec-reporter" with range "^3.3.0" that collides with a dependency in "devDependencies" of the same name with version "~4.2.1" [1/4] Resolving packages... [2/4] Fetching packages... info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info [email protected]: The platform "win32" is incompatible with this module. info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. error [email protected]: The engine "node" is incompatible with this module. Expected version "> 0.4.x < 0.9.0". error Found incompatible module info Visit <a class="postlink" href="https://yarnpkg.com/en/docs/cli/install">https://yarnpkg.com/en/docs/cli/install</a> for documentation about this command.
yarn-ignore-engine-start-error ERROR in C:/_tfs/epre/lightweight/angular/src/AppPreBootstrap.ts (133,24): Property 'tz' does not exist on type 'typeof moment'. ERROR in Error: Metadata version mismatch for module C:/_tfs/epre/lightweight/angular/node_modules/abp-ng2-module/node_modules/@angular/http/http.d.ts, found version 4, expected 3, resolving symbol ABP_HTTP_PROVIDER in C:/_tfs/epre/lightweight/angular/node_modules/abp-ng2-module/src/abp.module.ts, resolving symbol RootModule in C:/_tfs/epre/lightweight/angular/src/root.module.ts, resolving symbol RootModule in C:/_tfs/epre/lightweight/angular/src/root.module.ts at syntaxError (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler\bundles\compiler.umd.js:1729:34) at simplifyInContext (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler\bundles\compiler.umd.js:24979:23) at StaticReflector.simplify (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler\bundles\compiler.umd.js:24991:13) at StaticReflector.annotations (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler\bundles\compiler.umd.js:24418:41) at _getNgModuleMetadata (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler-cli\src\ngtools_impl.js:138:31) at _extractLazyRoutesFromStaticModule (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler-cli\src\ngtools_impl.js:109:26) at Object.listLazyRoutesOfModule (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler-cli\src\ngtools_impl.js:53:22) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:_tfs\epre\lightweight\angular\node_modules@angular\compiler-cli\src\ngtools_api.js:91:39) at AotPlugin._getLazyRoutesFromNgtools (C:_tfs\epre\lightweight\angular\node_modules@ngtools\webpack\src\plugin.js:240:66) at _donePromise.Promise.resolve.then.then.then.then.then (C:_tfs\epre\lightweight\angular\node_modules@ngtools\webpack\src\plugin.js:493:24) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ERROR in C:/_tfs/epre/lightweight/angular/src/AppPreBootstrap.ts (133,24): Property 'tz' does not exist on type 'typeof moment'.
Hello, I have a problem with updating anything in node.js. I want to update primenNG to get new turbo table feature. To have it, I presume, I need to run
npm update primeng
It totally breaks everything. There are other things missing like 'code-point-at', 'array-union'... and many other. When I manualy instal them all then there is an ultimate error messege when
npm start
is entered. Undefined property 'length' on udefined or such.
I found at strack overflow that the problem is in typescript. When i try to update it. It creates more issues.
I don't much understand node.js. I just use it for installing dependencies and running angular client. So I am not sure what kind of magic it needs to work.
When I run npm install first time I made a backup so I can always rollback and try something new. Delete node_modules and run npm install does not work. It produces error that contains this info [i]Error: Cannot find module 'code-point-at'[/].
Everything I install, update or any advice I follow just produces more errors.
Firstly why is it happening? Whan possible uknown dependency I miss ( typescript, node js itself...) and how to find it out without clean installing absolutely everything? Secondly how to update primeng?
Thank you.
Hi,
I Added CompanyDbContext to my project new to OriginalDbContex created by the template. I also regisetered it at OriginalEntityFrameworkCoreModule. It looks like this:
Configuration.Modules.AbpEfCore().AddDbContext<CompanyDbContext>(options =>
{
if (options.ExistingConnection != null)
{
CompanyDbContextConfigurer.Configure(options.DbContextOptions, options.ExistingConnection);
}
else
{
CompanyDbContextConfigurer.Configure(options.DbContextOptions, options.ConnectionString);
}
});
The problem is that the
options
parameter always contains default connecion string... I tried to register it at startup.cs which did not work either.
services.AddDbContext<CompanyDbContext>(options=>
{
var connectionString=_appConfiguration["ConnectionStrings:CS_Test"];
options.UseSqlServer(connectionString);
});
Can you help me to obtain the CS_Test parameter please?
I also implemented IDesignTimeDbContextFactory<CompanyDbContext> the same as the OriginalFbContext has. But the comment above it says
/* This class is needed to run "dotnet ef ..." commands from command line on development. Not used anywhere else */
Where is the problem then?
Thank you.
Hello,
how can I build front-end view that does not require user to log-in and doesn't have admin part just like demo application works. I couldn't find any approach and I believe that this will be super easy thing I just missed.