Skip to content

Invalid string length #4929

Description

@jycouet

Hello,

I'm using yarn v1.3.2 and I have a bug.

What is the current behavior?
I'm running yarn from js like this:

    ({ stdout, stderr } = await exec('yarn install --ignore-scripts  --ignore-engines', {
      cwd: tmpDir,
      shell: true,
      env: { NODE_ENV: 'dev', PATH: process.env.PATH },
    }));
    logger.debug(`yarn stdout:\n${stdout}`);
    logger.debug(`yarn stderr:\n${stderr}`);

And I often get: "stderr": "error An unexpected error occurred: \"Invalid string length\".\n"

Here is my trace:

Trace: 
  RangeError: Invalid string length
      at tokenise (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59559:16)
      at tokenise.next (<anonymous>)
      at Parser.next (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59657:30)
      at Parser.parse (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59737:14)
      at Parser.parse (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59761:28)
      at parse (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59850:17)
      at module.exports.exports.default (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:59443:96)
      at D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:1976:63
      at Generator.next (<anonymous>)
      at step (D:\Dev\jycouet_renovate\node_modules\yarn\lib\cli.js:92:30)

You you can see the package.json that I have (nothing really special?):

{
  "name": "vsts_tmpReno",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@angular/animations": "4.4.6",
    "@angular/cdk": "2.0.0-beta.12",
    "@angular/common": "4.4.6",
    "@angular/compiler": "4.4.6",
    "@angular/core": "4.4.6",
    "@angular/flex-layout": "2.0.0-rc.1",
    "@angular/forms": "4.4.6",
    "@angular/http": "4.4.6",
    "@angular/material": "2.0.0-beta.12",
    "@angular/platform-browser": "4.4.6",
    "@angular/platform-browser-dynamic": "4.4.6",
    "@angular/router": "4.4.6",
    "@markpieszak/ng-application-insights": "2.4.1",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.5",
    "@swimlane/ngx-datatable": "9.3.1",
    "angular-tree-component": "4.1.0",
    "angular2-moment": "1.7.0",
    "apollo-angular": "0.13.3",
    "apollo-client": "1.9.3",
    "apollo-client-rxjs": "0.6.0-rc.2",
    "bootstrap": "4.0.0-beta.2",
    "bowser": "1.8.1",
    "chart.js": "2.7.1",
    "classlist.js": "1.1.20150312",
    "core-js": "2.5.1",
    "d3": "4.11.0",
    "echarts": "3.8.5",
    "file-saver": "1.3.3",
    "font-awesome": "4.7.0",
    "graphql-tag": "2.5.0",
    "hammerjs": "2.0.8",
    "immutability-helper": "2.5.0",
    "leaflet": "1.2.0",
    "leaflet-geosearch": "2.6.0",
    "moment": "2.19.2",
    "mydaterangepicker": "4.1.11",
    "ng2-charts": "1.6.0",
    "ng2-date-picker": "2.6.2",
    "ngx-color-picker": "4.5.0",
    "ngx-echarts": "1.2.4",
    "ngx-infinite-scroll": "0.5.2",
    "ngx-swiper-wrapper": "4.6.6",
    "qrcodejs": "1.0.0",
    "rxjs": "5.5.2",
    "subscriptions-transport-ws": "0.8.3",
    "web-animations-js": "2.3.1",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "1.5.0",
    "@angular/compiler-cli": "4.4.6",
    "@angular/language-service": "4.4.6",
    "@types/chartjs": "0.0.30",
    "@types/geojson": "1.0.6",
    "@types/jest": "20.0.8",
    "@types/leaflet": "1.2.2",
    "@types/moment": "2.13.0",
    "@types/node": "6.0.91",
    "codelyzer": "3.0.1",
    "graphql": "0.10.5",
    "graphql-code-generator": "0.8.14",
    "jest": "21.2.1",
    "jest-junit-reporter": "1.1.0",
    "jest-preset-angular": "3.0.2",
    "mutationobserver-shim": "0.3.2",
    "prettier": "1.8.2",
    "ts-node": "3.0.6",
    "tslint": "5.3.2",
    "tslint-config-prettier": "1.6.0",
    "tslint-microsoft-contrib": "5.0.1",
    "typescript": "2.6.1",
    "webpack-bundle-analyzer": "2.9.1"
  }
}

I don't get what could be the issue; Could you help me please?

Please mention your node.js, yarn and operating system version.
node: 8.7.0
yarn 1.3.2
On windows and Linux

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions