Open Closed

JQuery + MVC - Invalid Glob Argument - npm run create-bundles - v9.3.0 #9825


0
dexmox created
  • What is your product version? ANZ Version 9.3.0

  • What is your product type (Angular or MVC)? MVC + JQuery

  • What is product framework type (.net framework or .net core)? .Net Core

Thank you in advance.

Could you please point me in the direction to resolve this issue - was working a few days ago, then suddenly stopped. I am not great with Yarn / NPM / Gulp.

I havent added any packages that I am aware of. I have added two new themes to the bundles.json which are working normally, and created as per the documentation. Deleted yarn.lock and node_modules - re run yarn

I would also be willing to grant you access via teamviewer if you would like to schedule a connection with me - at your convenience, if I cannot provide any additional information to figure out what may be going wrong.

Debug Log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'create-bundles'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v13.14.0
4 verbose run-script [ 'precreate-bundles', 'create-bundles', 'postcreate-bundles' ]
5 info lifecycle abpzerotemplate@9.3.0~precreate-bundles: abpzerotemplate@9.3.0
6 info lifecycle abpzerotemplate@9.3.0~create-bundles: abpzerotemplate@9.3.0
7 verbose lifecycle abpzerotemplate@9.3.0~create-bundles: unsafe-perm in lifecycle true
8 verbose lifecycle abpzerotemplate@9.3.0~create-bundles: PATH: C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc\node_modules\.bin;C:\Users\Admin\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Admin\bin;C:\Program Files (x86)\iis express\PHP\v5.6;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies;C:\Program Files\Microsoft Network Monitor 3;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Acronis\CommandLineTool;C:\Program Files\Acronis\PyShell\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files (x86)\Common Files\Acronis\VirtualFile;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64;C:\Program Files\PuTTY;C:\Users\Admin\AppData\Local\atom\bin;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\dotnet;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\Yarn\bin;C:\Program Files\nodejs;C:\Users\Admin\.dotnet\tools;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\DOCFX\docfx.exe;C:\Users\Admin\AppData\Local\Yarn\bin;C:\Users\Admin\AppData\Roaming\npm;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle abpzerotemplate@9.3.0~create-bundles: CWD: C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc
10 silly lifecycle abpzerotemplate@9.3.0~create-bundles: Args: [ '/d /s /c', 'yarn && gulp buildDev' ]
11 silly lifecycle abpzerotemplate@9.3.0~create-bundles: Returned: code: 1  signal: null
12 info lifecycle abpzerotemplate@9.3.0~create-bundles: Failed to exec create-bundles script
13 verbose stack Error: abpzerotemplate@9.3.0 create-bundles: `yarn && gulp buildDev`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1026:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid abpzerotemplate@9.3.0
15 verbose cwd C:\Users\Admin\source\MyPackageName\src\MyPackageName.Web.Mvc
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "create-bundles"
18 verbose node v13.14.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error abpzerotemplate@9.3.0 create-bundles: `yarn && gulp buildDev`
22 error Exit status 1
23 error Failed at the abpzerotemplate@9.3.0 create-bundles script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]


4 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @dexmox

    Probably some of the npm packages installed a newer minor version during package installation. Could you check installed version of @angular-devkit/build-angular ? If you can't solve this problem, could you share your packge.json content ?

    Thanks,

  • 0
    dexmox created

    Hi @ismcagdas ,

    Thank you as always for your assistance.

    I am using the MVC so I am not sure if the @angular-devkit is applicable ?

    As I cannot answer that question my package.json file is as per below :

    This appears to be the same one as the 9.3.0 repo / fresh download if I am not mistaken, git only shows me a few version changes on a few packages.

    I look forward to your response and appeciate all assistance.

    I am sorry I am not too familiar with NPM, Yarn, Gulp.

    I am also still very open to organizing a teamviewer / similar connection if the issue is not obvious / preferable to troubleshoot.

    package.json

    {
      "name": "abpzerotemplate",
      "scripts": {
        "create-bundles": "yarn && gulp buildDev",
        "build": "yarn && gulp build"
      },
      "version": "9.3.0",
      "dependencies": {
        "@fancyapps/fancybox": "^3.5.7",
        "@fortawesome/fontawesome-free": "^5.8.1",
        "@microsoft/signalr": "^3.1.2",
        "abp-web-resources": "5.2",
        "animate.css": "^3.7.0",
        "autosize": "^4.0.2",
        "block-ui": "^2.70.1",
        "blueimp-file-upload": "^10.2.0",
        "bootstrap": "4.3.1",
        "bootstrap-daterangepicker": "^3.0.3",
        "bootstrap-hover-dropdown": "^2.2.1",
        "bootstrap-markdown": "^2.10.0",
        "bootstrap-maxlength": "^1.6.0",
        "bootstrap-notify": "^3.1.3",
        "bootstrap-select": "^1.13.9",
        "bootstrap-switch": "3.3.4",
        "bootstrap-timepicker": "^0.5.2",
        "bootstrap-touchspin": "^4.2.5",
        "bootstrap4-datetimepicker": "^5.2.3",
        "bower": "*",
        "chart.js": "^2.7.3",
        "chartist": "^0.11.0",
        "cookieconsent": "^3.1.0",
        "css-toggle-switch": "^4.1.0",
        "d3": "^5.9.1",
        "datatables.net": "^2.1.1",
        "datatables.net-bs4": "^3.2.2",
        "datatables.net-responsive": "^2.2.3",
        "datatables.net-responsive-bs4": "^2.2.3",
        "datatables.net-select": "^1.3.0",
        "detect-zoom": "^1.0.2",
        "dropzone": "^5.5.1",
        "easy-pie-chart": "^2.1.7",
        "famfamfam-flags": "^1.0.0",
        "flot": "^0.8.0-alpha",
        "gmaps": "^0.4.24",
        "gridstack": "0.2.6",
        "inputmask": "^4.0.6",
        "ion-rangeslider": "^2.3.0",
        "jquery": "^3.3.1",
        "jquery-form": "^4.2.2",
        "jquery-serializejson": "^2.9.0",
        "jquery-slimscroll": "^1.3.8",
        "jquery-sparkline": "^2.4.0",
        "jquery-validation": "^1.19.0",
        "jquery.counterup": "^2.1.0",
        "jquery.uniform": "^4.3.0",
        "jqvmap": "^1.5.1",
        "js-cookie": "^2.2.0",
        "js-url": "^2.3.0",
        "json2": "*",
        "jstree": "^3.3.7",
        "localforage": "^1.7.3",
        "malihu-custom-scrollbar-plugin": "^3.1.5",
        "moment": "^2.24.0",
        "moment-timezone": "^0.5.23",
        "morris.js": "^0.5.0",
        "mustache": "^3.0.1",
        "pace-progress": "^1.0.2",
        "perfect-scrollbar": "^1.4.0",
        "popper.js": "^1.14.7",
        "prismjs": "^1.16.0",
        "push.js": "^1.0.9",
        "pwstrength-bootstrap": "^3.0.5",
        "rangeslider.js": "^2.3.2",
        "raphael": "^2.2.8",
        "select2": "^4.0.10",
        "select2-bootstrap-theme": "^0.1.0-beta.10",
        "signalr": "^2.4.0",
        "simple-line-icons": "^2.4.1",
        "socicon": "^3.0.5",
        "spin.js": "^2.3.2",
        "sticky-js": "^1.2.0",
        "summernote": "^0.8.11",
        "sweetalert": "^2.1.2",
        "tether": "1.4.7",
        "timeago": "^1.6.5",
        "toastr": "^2.1.4",
        "tooltip.js": "^1.3.1",
        "topojson": "^3.0.2",
        "typeahead.js": "^0.11.1",
        "underscore": "^1.9.1",
        "urijs": "^1.19.1",
        "waypoints": "^4.0.1"
      },
      "devDependencies": {
        "@types/node": "^12.7.4",
        "globby": "^9.2.0",
        "gulp": "^4.0.1",
        "gulp-clean-css": "^4.2.0",
        "gulp-concat": "^2.6.1",
        "gulp-less": "^4.0.1",
        "gulp-postcss": "^8.0.0",
        "gulp-uglify-es": "^1.0.4",
        "merge-stream": "^2.0.0",
        "postcss-url": "^9.0.0",
        "rimraf": "^3.0.0",
        "yarn": "^1.15.0"
      }
    }
    
  • 0
    dexmox created

    Hi @ismcagdas ,

    I have located and resolved the issue, Thank you for your time and assistance.

    Somehow a few of the datatables scripts and translations were missing. Once I located this, I placed them back into the correct location and this resolved the issue.

    However, to locate the issue I had to find out where it was getting stuck - Is it possible in future that Gulp could be a bit more verbose to show it could not locate a file to process ?

    Another solution from Gulp would be:

    When an invalid glob is given in globs, throws an error with the message, "Invalid glob argument". To suppress this error, set the allowEmpty option to true.

    Gulp - Explaining Globs

    Avoid using Node's path methods, like path.join, to create globs. On Windows, it produces an invalid glob because Node uses \ as the separator. Also avoid the __dirname global, __filename global, or process.cwd() for the same reasons.

    I also noticed when going through the gulpfile.js and the vynl-fs index.js file these pathing methods are used, not sure if it is much to be concerned with but just thought I would mention it.

  • 0
    musa.demir created
    Support Team

    Hi @dexmox

    Glad to hear you fixed your problem. I created an issue about trying to throw better exceptions. (https://github.com/aspnetzero/aspnet-zero-core/issues/3606) Thank you.