question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimist reference throwing error on NGC build

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

eestein@SteinMac sdk-front (master) $ ng --version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.5.0
Node: 7.7.3
OS: darwin x64
Angular: 5.0.1
... common, compiler, compiler-cli, core, forms, http
... platform-browser, platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1

Repro steps.

Create a lib project and run ngc

gulp ngc task:

gulp.task('ngc', function () {
    return ngc({
        project: `${tmpFolder}/tsconfig.es5.json`
    })
        .then((exitCode) => {
            if (exitCode === 1) {
                throw new Error('Compiler error');
            }
        });
});

The log given by the failure.

[10:18:41] TypeError: args.indexOf is not a function
    at module.exports (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/minimist/index.js:44:14)
    at readNgcCommandLineAndConfiguration (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/@angular/compiler-cli/src/main.js:66:41)
    at main (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/@angular/compiler-cli/src/main.js:21:24)
    at Gulp.<anonymous> (/Users/eestein/Documents/dev/dacasa/sdk-front/gulpfile.js:47:12)
    at module.exports (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/orchestrator/index.js:134:8)
    at runNextSet (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/run-sequence/index.js:86:16)
    at Gulp.onTaskEnd (/Users/eestein/Documents/dev/dacasa/sdk-front/node_modules/run-sequence/index.js:75:5)
ERROR: args.indexOf is not a function

Desired functionality.

Run build with no error

Mention any other details that might be useful.

minimist code:

    var notFlags = [];

    if (args.indexOf('--') !== -1) {                   // line throwing error
        notFlags = args.slice(args.indexOf('--')+1);
        args = args.slice(0, args.indexOf('--'));
    }

compiler-cli code:

function readNgcCommandLineAndConfiguration(args) {
    var options = {};
    var parsedArgs = require('minimist')(args);                  // line throwing error

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - Snyk
... @nuofe/ndk-build-tool · @nuxt/friendly-errors-webpack-plugin ... @thegrizzlylabs/cordova-plugin-genius-scan · @throw-out-error/minecraft-datapack ...
Read more >
ts-api-guardian | Yarn - Package Manager
When a class inherits its constructor from a base class, the compiler may now report an error when that constructor cannot be used...
Read more >
Untitled
Testeo con animales, Jerusalem blake free sheet music, Cunard building new york ... Error 70047, Sony g900 whatsapp, Bob graham education center reviews, ......
Read more >
BUILD YOUR OWN NGC. - Bio-Rad
The NGC chromatography system introduces a new level of modularity and usability for protein purification. Use our interactive NGC configurator to design your ......
Read more >
Untitled
Pau orriols vilanova i la geltru, Gundam build fighter 2nd op, Ngc 2665, C# mvc render ... Passing by reference php, Xiaojun guo,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found