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

AspNetZero.Web.Public not working in 6.3.1 #6037


User avatar
0
rafalpiotrowski created

after upgrade to 6.x I got the following errors:

SCRIPT5007: SCRIPT5007: Unable to set property 'defaultSourceName' of undefined or null reference localhost:3434 (310,9)

SCRIPT5007: SCRIPT5007: Unable to get property 'unspecifiedClockProvider' of undefined or null reference GetScripts (1289,5)

SCRIPT5009: SCRIPT5009: 'jQuery' is not defined back-to-top.js (52,3)

2 SCRIPT5009: SCRIPT5009: '$' is not defined localhost:3434 (326,9)

Brak wyników


11 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, are you using Angular or Jquery version?

  • User Avatar
    0
    rafalpiotrowski created

    I use Angular but this is ASP.NET MVC application

  • User Avatar
    0
    ryancyq created
    Support Team

    It seems that the js files are not bundled correctly. You can try running npm run create-bundles command for the public project.

    Can you also share the version of ANZ that you are upgrading from?

  • User Avatar
    0
    rafalpiotrowski created

    I run the project from VS and also do Publish on my IIS server and have the same result

    How can I solve it.

    I upgrated from 5.4.1

  • User Avatar
    0
    rafalpiotrowski created

    in which folder do I have to run npm run create-bundle?​

  • User Avatar
    0
    ryancyq created
    Support Team

    You can navigate to root directory of *.Web.Public project and run npm run create-bundles command.

    Can I double check that you are using AspNetCore & Angular (with .NET framework 4.6.1) ?

  • User Avatar
    0
    rafalpiotrowski created

    I am using aspnetcore and angular with net 4.6.1

    when I run the create bundle I get that the package.json file is missing

    C:\Users\me\source\repos\MyApp\aspnet-core\src\MyApp.Web.Public>npm run create-bundles npm ERR! path C:\Users\me\source\repos\MyApp\aspnet-core\src\MyApp.Web.Public\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\me\source\repos\MyApp\aspnet-core\src\MyApp.Web.Public\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

    npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\me\AppData\Roaming\npm-cache_logs\2018-11-28T21_05_30_162Z-debug.log

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, the issue most likely is caused by js files bundling.

    You can try the approach in https://support.aspnetzero.com/QA/Questions/5868#answer-6055b64c-4bcb-bb3d-8e60-39ea047fceb9

  • User Avatar
    0
    rafalpiotrowski created

    there is not packages.json file in Web.Public project so running npm run create-bundles failes

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, you can try installing BundlerMinifier fr visual studio market place and follow the steps in https://support.aspnetzero.com/QA/Questions/5868#answer-6055b64c-4bcb-bb3d-8e60-39ea047fceb9

  • User Avatar
    0
    rafalpiotrowski created

    this worked! thanks