Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Update breaks front side ( asp net core+angular2) #4744


User avatar
0
janhu created

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.


12 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @janhu please follow this issue <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/858">https://github.com/aspnetzero/aspnet-ze ... issues/858</a>. We will upgrade it in a short time.

  • User Avatar
    0
    janhu created

    The link goes nowhere

  • User Avatar
    0
    janhu created

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

    I am not able to execute

    npm update
    

    without breaking whole project.

  • User Avatar
    0
    BobIngham created

    run yarn, not npm update

  • User Avatar
    0
    janhu created

    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.
    
  • User Avatar
    0
    alper created
    Support Team

    try to delete all files & folders in node_modules before updating it.

  • User Avatar
    0
    janhu created

    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.
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Just apply this cange <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/2d3a434f56ecaed1dd205257d6ea1bb0c14032f3">https://github.com/aspnetzero/aspnet-ze ... b0c14032f3</a>.

    Then remove node_modules folder. After that, run "yarn" command again.

  • User Avatar
    0
    janhu created

    Again!

    the link goes nowhere.

  • User Avatar
    0
    ismcagdas created
    Support Team

    You need to login with your github account "janhu1".

  • User Avatar
    0
    janhu created

    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.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Please take a look at this commit <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/d377aec7fb3fcb11b9dd881aceec4247e4e4e562">https://github.com/aspnetzero/aspnet-ze ... 47e4e4e562</a>. We have updated sweetalert but it seems like your project is not totally using the new version.