I'm curious about the origins of the "readme" field within the artifact registry file

Within our private npm registry on Azure, we house our own npm package alongside the npmjs packages. One particular package, @typescript-eslint/parser, has caused our pipelines to fail during the npm install task due to a

SyntaxError: Unexpected end of JSON input...
.

2020-03-30T14:10:52.6744568Z npm http fetch GET 200 https:/EDITED.pkgs.visualstudio.com/_packaging/EDITED-Artifacts/npm/registry/@typescript-eslint%2fparser 216884ms
2020-03-30T14:10:52.6745003Z npm verb teardown shutting down workers.
2020-03-30T14:10:52.6745278Z npm info teardown Done in 0s
2020-03-30T14:10:52.6745630Z npm verb stack SyntaxError: Unexpected end of JSON input while parsing near '...odebase, don't forget'
2020-03-30T14:10:52.6746036Z npm verb stack     at JSON.parse (<anonymous>)
2020-03-30T14:10:52.6746533Z npm verb stack     at parseJson (C:\temp\_work\_tool\node\8.17.0\x64\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
2020-03-30T14:10:52.6747277Z npm verb stack     at consumeBody.call.then.buffer (C:\temp\_work\_tool\node\8.17.0\x64\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
2020-03-30T14:10:52.6747811Z npm verb stack     at <anonymous>
2020-03-30T14:10:52.6748134Z npm verb stack     at process._tickCallback (internal/process/next_tick.js:189:7)
2020-03-30T14:10:52.6748474Z npm verb cwd C:\temp\_work\4\s
2020-03-30T14:10:52.6748696Z npm verb Windows_NT 10.0.18362
2020-03-30T14:10:52.6749157Z npm verb argv "C:\\temp\\_work\\_tool\\node\\8.17.0\\x64\\node.exe" "C:\\temp\\_work\\_tool\\node\\8.17.0\\x64\\node_modules\\npm\\bin\\npm-cli.js" "ci"
2020-03-30T14:10:52.6749618Z npm verb node v8.17.0
2020-03-30T14:10:52.6749914Z npm verb npm  v6.13.4
2020-03-30T14:10:52.6750208Z npm ERR! Unexpected end of JSON input while parsing near '...odebase, don't forget'
2020-03-30T14:10:52.6750526Z npm verb exit [ 1, true ]

We have observed that the description file for this package includes a readme field, greatly increasing its size (the @typescript-eslint%2fparser description JSON is 5.5MB, with the readme field removed it is only 1.5MB). Is this field automatically added by the Azure registry, included by the package author, or another source altogether?

Is there a way to remove this field from the package description file?

Answer №1

The error mentioned above might occur due to a cache issue or a corrupted package-lock.json file.

To troubleshoot, you can start by executing the command npm cache clean --force before installing the package using npm.

npm cache clean --force
npm install -g @typescript-eslint/parser

If the problem persists, consider deleting the package-lock.json file.

If none of the previous solutions work, it's worth checking for any errors in the section where the ...odebase, don't forget is located within your package.

For further insights, you may want to review this thread

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

After updating on Mac, the dreaded message 'gyp ERR! build error' appeared

After running npm install, I started encountering a gyp error that I can't seem to fix. This package was functioning fine with the older version of node, so I tried manually removing and reinstalling node, but it didn't resolve the issue (or mayb ...

The command "react-scripts-start" could not be found in the current environment

I encountered an issue with running npm start on a project I've been working on. After not touching the project for two weeks, the only change I made recently was adding a git repository to it. Upon attempting to run npm start, I received the follow ...

Trouble integrating PDF from REST API with Angular 2 application

What specific modifications are necessary in order for an Angular 2 / 4 application to successfully load a PDF file from a RESTful http call into the web browser? It's important to note that the app being referred to extends http to include a JWT in ...

What is the best way to assign unique IDs to automatically generated buttons in Angular?

Displayed below is a snippet of source code from an IONIC page dedicated to shapes and their information. Each shape on the page has two buttons associated with it: shape-properties-button and material-information-button. Is it possible to assign different ...

Managing plain text and server responses in Angular 2: What you need to know

What is the best way to handle a plain text server response in Angular 2? Currently, I have this implementation: this.http.get('lib/respApiTest.res') .subscribe(testReadme => this.testReadme = testReadme); The content of lib/respApi ...

"Observables in RxJs: Climbing the Stairs of

Previously, I utilized Promise with async/await syntax in my Typescript code like this: const fooData = await AsyncFooData(); const barData = await AsyncBarData(); ... perform actions using fooData and barData However, when using RxJs Observable<T> ...

Ignore any information in NestJS that is not included in the data transfer object

In my NestJS controller, I have defined a route for updating locality information. The structure of the controller method is as follows: @Put('/:id') updateLocalityInfo( @Query('type') type: string, @Body() data: EditLocalityD ...

Ensuring Map Safety in Typescript

Imagine having a Map structure like the one found in file CategoryMap.ts export default new Map<number, SubCategory[]>([ [11, [100, 101]], [12, [102, 103]], ... ]) Is there a way to create a type guard for this Map? import categoryMap fro ...

Encountering an error while running npm install in a forked VueJS application

Recently, I was tasked by a company to develop a simple Vue app. To get started, I forked the code from their repository and attempted to run npm install. Unfortunately, this process resulted in several errors as detailed in this log file. Additionally, he ...

Switch back to using npm instead of pnpm

After running into compatibility issues with other tools, I've come to the realization that I can't continue using pnpm in my project. Is there a smooth way for me to transition back to npm, my usual package manager? How would you suggest I appro ...

Looping through children components in a LitElement template

I aim to generate <slot>s for each child element. For instance, I have a menu and I intend to place each child inside a <div> with a item class. To achieve this, I have devised a small utility function for mapping the children: export functio ...

"An identifier was expected causing a parsing error" triggered by v-on:change

Encountered an issue where importing a class to be used solely as a typescript type annotation resulted in a no-unused vars error. Following advice from this discussion thread, I added "plugin:@typescript-eslint/recommended" to the eslint config, ...

I am facing an issue with installing an npm package due to an error related

Having some trouble with installing sudo npm i sharp -g /usr/lib/node_modules/sharp/binding.js:3 const fs = require('fs'); ^^^^^ SyntaxError: Use of const in strict mode. Whenever I attempt to install packages with ES6 syntax Just updated m ...

The Angular NgFor directive can only be used to bind data to Iterables like Arrays

I am encountering an issue when attempting to iterate through and display data using ngFor. The specific error appearing in the console is "Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only su ...

Learn how to open a component in a new browser tab using Angular from a different component

I wish to display the MapComponent in a new browser tab when a button in my AppComponent html file is clicked. Currently, when I click the button, the MapComponent opens in a new tab but it also displays the button. How can I configure it so that only the ...

Is it necessary to clean and reinstall node_modules every time I deploy in a production environment?

We manage over 10 production servers and each time we update our dependencies, performing a clean installation seems more controlled but also slower. The issue is that the devops team is concerned about the time it takes to perform a clean npm install aft ...

Utilizing a TypeScript definition file (.d.ts) for typings in JavaScript code does not provide alerts for errors regarding primitive types

In my JavaScript component, I have a simple exporting statement: ./component/index.js : export const t = 'string value'; This component also has a TypeScript definition file: ./component/index.d.ts : export const t: number; A very basic Typ ...

Tips for ensuring the angular FormArray is properly validated within mat-step by utilizing [stepControl] for every mat-step

When using Angular Material stepper, we can easily bind form controls with form groups like [stepControl]="myFormGroup". But how do we bind a FormArray inside a formGroup? Constructor constructor(private _fb: FormBuilder){} FormArray inside For ...

Initial compilation of Angular 2 project with lazy-loaded submodules fails to resolve submodules

I'm working on an Angular 2 project (angular cli 1.3.2) that is structured with multiple modules and lazy loading. In my main module, I have the following code to load sub-modules within my router: { path: 'module2', loadChildren: & ...

The issue of HTTP parameters not being appended to the GET request was discovered

app.module.ts getHttpParams = () => { const httpParamsInstance = new HttpParams(); console.log(this.userForm.controls) Object.keys(this.userForm.controls).forEach(key => { console.log(this.userForm.get(key).value) const v ...