Skip to content

ng fails on Version.assertPostWebpackVersion() on 1.0.0-beta.14 #2135

@andrevmatos

Description

@andrevmatos
  1. OS?
    Arch Linux with latest kernel and Node 6.5.0 through NVM
  2. Versions:
    angular-cli: 1.0.0-beta.14
    node: 6.5.0
    os: linux x64
  3. Repro steps.
    Local installation, empty folder:
    npm i angular-cli
    ./node_modules/.bin/ng init # fails
  4. The log given by the failure.
    fs.js:640
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
    ^

TypeError: path must be a string or Buffer
at TypeError (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Function.Version.fromProject (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:87:31)
at Function.Version.isPreWebpack (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:111:31)
at Function.Version.assertPostWebpackVersion (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/upgrade/version.js:97:18)
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/angular-cli/bin/ng:25:15
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:44:21
at ondir (/sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:187:31)
at /sec/Dev/Link/scripts/web_files_py/flask_ged/ng/node_modules/resolve/lib/async.js:153:3

  1. Mention any other details that might be useful.
    Commenting out the line 25 on angular-cli/bin/ng makes everything work again.
    This with the check Version.assertPostWebpackVersion(), was added on commit 21003b1 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions