Base solution for your next web application

Activities of "janhu"

The link was sent.

Question

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'.

Thank you! It helped a bit.

I updated yarn.lock and packages.json, deleted node_modules and run yarn which was executed sucessfully.

But

I can't execute

npm start

. It gets stuck on 91%.

> [email protected] start C:\_tfs\ePrezence\lightweight\angular
> ng serve --host 0.0.0.0 --port 4200

** NG Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
 91% additional chunk assets processingError: ENOENT: no such file or directory, open 'C:\_tfs\ePrezence\lightweight\angular\node_modules\sweetalert\dist\sweetalert-dev.js'

I tried to search for a solution but nothing was related to boilerplate solution.

Again!

the link goes nowhere.

I did that. I also updated everythink I could. Still no progress. My approach was following. I got my node.js and yarn updated, then the node_modules directory deleted and finally yarn command executed.

Result remains the same.

yarn install v1.5.1
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 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.
error [email protected]: The engine "node" is incompatible with this module. Expected version "> 0.4.x < 0.9.0".
error An unexpected error occurred: "Found incompatible module".
info If you think this is a bug, please open a bug report with the information provided in "C:\\_tfs\\ePrezence\\lightweight\\angular\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Thank you, but still no progress. What should I do?

How could I have incompatible dependency? It's very strange.

yarn install v0.23.4
warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm 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...
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 https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Also, the problem is not PrimeNg itself but updata as a whole.

I am not able to execute

npm update

without breaking whole project.

The link goes nowhere

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.

Thank you. I created my own ConnectionStringResolver. Unfortunaltely the configuration provided in ConfigurationManager did not contain the connection string from appsettings.json so I had to hard code id.

So be it... issue is resolved even though I am very disappointed or I did not get it correctly.

Showing 1 to 10 of 15 entries