Base solution for your next web application
Open Closed

Legacy frontend build #5014


User avatar
0
janhu created

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


2 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    if you want to send your project, put it on the Google Drive and send the link to <a href="mailto:[email protected]">[email protected]</a> including your forum post.

  • User Avatar
    0
    janhu created

    The link was sent.