Error While Installing Atom Editor Packages

Encountering an issue while installing packages in Atom

    npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Users\\Jarvis\\AppData\\Local\\atom\\app-1.5.3\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Jarvis\\AppData\\Local\\atom\\app-1.5.3\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\Jarvis\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\Jarvis\\.atom\\.apmrc" "install" "C:\\Users\\Jarvis\\AppData\\Local\\Temp\\d-116128-3752-1lwywgv\\package.tgz" "--target=0.34.5" "--arch=ia32"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! file C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json
npm ERR! code EJSONPARSE

npm ERR! Failed to parse json
npm ERR! Unexpected token '\u0000' at 1:1
npm ERR! 
npm ERR! ^
npm ERR! File: C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR! 
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse

Attempting to install multiple packages in Atom Editor resulted in the above error message.

Answer №1

If you happen to open the

C:\Users\Jarvis\.atom\.apm\nopt\3.0.6\package\package.json
file using Notepad++ (or any other text editor of your choice - just avoid using Atom as it may crash, especially in Version 1.6.2), you will notice some non-printable characters within the file, specifically many instances of NUL. I encountered the same issue when trying to update my packages.

To fix this error, here is what I did. Keep in mind that you will need to reinstall all your packages. Personally, I use sync-settings which makes it easy for me to restore my packages and settings.

  • Delete the entire C:\Users\Jarvis.atom\packages folder
  • Delete the entire C:\Users\Jarvis.atom.apm folder
  • Reinstall all your packages (the .apm folders will be reinstalled automatically)

Deleting these folders can be challenging due to Windows' path length restrictions. In such cases, a helpful solution can be found in this Stack Exchange answer: How to delete a file in Windows with a too long filename?

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

Is there any method to prevent the default icon from showing up and disable the one-click functionality?

package.json: { "name": "password-generator-unique", "productName": "Unique Password Generator", "version": "1.0.0", "description": "Custom password generation desktop tool& ...

Properly initializing, installing, and running a build in a WordPress plugin using npm

Although it might seem like a silly question, I'm feeling a bit lost trying to make edits to the WordPress plugin that I downloaded from the GitHub repository: https://github.com/WordPress/gutenberg-examples. Currently, I am following the block tutor ...

Understanding the Difference Between WARN and ERR in npm Peer Dependency Resolution

I encountered a puzzling situation where two projects faced the same issue, yet npm resolved them differently: https://github.com/Sairyss/domain-driven-hexagon npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! W ...

What steps do I need to take in order to execute npm projects using Bash shell commands on a Windows operating

Upon inheriting a project, I discovered some NPM scripts that were designed to work on a MAC environment. Here is an example: { "package": "yarn package-common && mv './dist/APP® TV.wgt' ''./package/$(yarn -s filename)&apo ...

It seems like NativeScript is facing compatibility issues on Linux systems running Node.js version 11.1.0

Setting up NativeScript on my Arch Linux machine has been a bit of a challenge. When I try to run tns doctor, I keep getting the following error message: Support for Node.js 11.1.0 is not verified. NativeScript CLI might not install or run properly. Refe ...

What is the reason behind npm's decision to categorize dependencies into two separate categories?

Within your package.json, you will find the sections for dependencies and devDependencies. { "devDependencies": { "webpack": "^4.42.1" }, "dependencies": { "react": "^16.13.1" } } The purpose behind this division is clear: dependencies ...

Managing package versions with package.json and teamcity integration

Our team utilizes TeamCity for builds and deployments. One of our goals is to have TeamCity automatically set the version number in the package.json file. In the past, we used a tool called gulp-bump to update the version number, but TeamCity's build ...

Providing pre-compiled native binaries through npm distribution

Can native binaries be distributed using npm, and is there any documentation available on this topic? ...

Tips for combining Angular 2 with a current J2EE Spring project and deploying them on the same PORT

I currently have a project with Spring on the back-end and AngularJS 1 on the front-end. When I start the Spring server, it only opens one port for me: 8080 which allows me to access REST APIs and the AngularJS front-end components. https://i.stack.imgur. ...

What is the process for setting up the auth parameter while utilizing lerna publish?

I configured my .npmrc file to publish to a private registry without exposing auth credentials. How can I pass the _auth configuration when executing the lerna publish command? It seems that lerna publish does not support the use of the _auth flag: https: ...

The Foundation CLI is malfunctioning, throwing a ReferenceError stating that primordials are not defined

Running Windows 10 (64 bit) with Node v13.0.1 and npm 6.12.0, I encountered an issue while attempting to install foundation-cli globally. When I run the command "foundation new" or "foundation -v", I receive the error message "ReferenceError: primordials ...

having difficulty with installing the bootstrap framework

I'm having issues installing the ng-bootstrap in my project. I keep encountering the following error message. Despite trying to execute the commands below, I haven't had any success. npm install --legacy-peer-deps npm install latest-version He ...

Having difficulties getting styled-components to install properly

Having an issue while trying to install styled-components. Received the following error message: npm ERR! Cannot read properties of null (reading 'edgesOut') Here is my npm command: npm install styled-components npm ERR! Cannot read properties o ...

Node.js - encountering difficulty loading environment variable in mysql2 module

I am currently facing an issue with utilizing the mysql2 package to connect node with MySQL. I have stored my username and password in a .env file, however, when I try to use it in my configuration for connecting to MySql, it does not seem to load properly ...

Issues with using `npm install` on a compressed tarball package

Hello, I am currently attempting to globally install a module that I created using a gzipped tarball. After downloading the source from GitHub and converting it to a tar.gz file, I attempted to install it using the command below: npm install forever.tar.g ...

Fixing compatibility problems, security risks, alerts, clashes, and disparate releases within React

I am currently working on: Resolving the dependency issues that are surfacing in my React application Gaining a deeper understanding of why these issues are occurring Finding the best approach to address these types of problems properly, without resorting ...

An issue has been encountered with the Shopify package while trying to create a Client instance

Looking for help with importing the Shopify API from NPM and setting up the client without encountering errors. Here is the code snippet: import Shopify from '@shopify/shopify-api'; const client = new Shopify.Clients.Rest('store_name_here.m ...

Encountering problems with unmet peer dependency in npm, specifically tied to react-native

I seem to be a bit confused about how npm handles dependencies. I came across this: npm list react-native <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c3b3b1aca9a6a0b783f3edf3edf2">[email protected]</a> /Users/ ...

Issue encountered: Module 'jasmine-expect' not found [Protractor]

I am facing an issue while trying to execute a protractor test that connects to my application. Upon running the command (git bash/terminal): protractor conf.js An error is displayed as follows: " Error: Cannot find module 'jasmine-expect&apo ...

Using require() instead of import in Strip-Ansi leads to an exception being generated

Encountering an issue with my Angular 13 project when attempting to serve it, I am faced with the following error: An unhandled exception occurred: require() of ES Module C:\Users\username\Documents\project\builds\Production ...