Having trouble creating an app with Angular CLI: Encountered an issue with parsing JSON input, near the end of the input string '...bgwj8Xr2oElY7PTvOKwwu&#

I'm stuck trying to figure out where I went wrong. Initially, I had trouble getting NPM to install Angular as it kept timing out and throwing errors. Eventually, I managed to successfully install Angular after installing Yarn.

However, now the Angular CLI isn't working.

Here are some of the steps I've taken to try to fix the issue: * Uninstalled and re-installed Node * Cleared npm's cache * Uninstalled and re-installed Angular * Ran all commands as an admin * Installed Yarn

I've been working on this for hours and I'm at my wit's end. This is a brand new computer and I've never faced this problem when installing Angular on two other machines.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\shari\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '--quiet'
1 verbose cli ]
... (truncated for brevity)

Answer №1

My installation problem was caused by the slow internet speed at my previous location. It would consistently fail at various points due to timing out.

Once I relocated to an area with faster internet, I encountered the same error initially. However, after utilizing npm cache clean --force to clear the cache, I successfully installed Angular without any issues.

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

Npm encounters an error when compiling a dependency in Polymer

gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/nodejs-binary-4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) I've been diligently working on setting up my first ever p ...

Error encountered during the production build of Angular 2. No issues reported during development phase

During development, I can successfully run the code below. However, when I deploy to production, I encounter the following errors: node_modules/@angular/common/src/pipes/async_pipe.d.ts(39,38): error TS2304: Cannot find name 'Promise'. node_modu ...

Can you please explain the reason behind the "npm WARN EBADENGINE" notification?

After running npm install and creating a package-lock.json file, I encountered the following error: npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="07 ...

An issue was encountered at node_modules/@fullcalendar/core/main.d.ts(1196,54), error TS1144: Expecting either '{' or ';'

When attempting to execute npm run build in my project, I encountered the following error: ERROR in node_modules/@fullcalendar/core/main.d.ts(1196,54): error TS1144: '{' or ';' expected. node_modules/@fullcalendar/core/main.d.ts(1197,34 ...

Is it possible to prompt npm to install a sub-dependency from a GitHub pull request?

Currently, I'm in the process of setting up geofirestore, which has a dependency on geofirestore-core. However, there is an existing bug in geofirestore-core that has been addressed in a pull request. How can I make sure that my geofirestore installa ...

The command "npm start" fails to run in a new React project for some unknown reason

I've encountered a strange issue with my React projects. When I try to start a new project using "npm start", nothing happens in any of my existing projects. Even when I create a new sample React project with create-react-app testnpm, the command npm ...

Having trouble installing Angular 2 with npm?

Encountered an error while trying to install Angular 2: npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ic020019\\AppData\\Roaming\&bs ...

Issue with npm during installation of REACT - not functioning as expected

After executing all the necessary commands on the command line, including globally installing npm with npm install -g create-react-app, as well as running npx create-react-app <myprojectname> and clearing the npm cache, I consistently encountered an ...

Dockerized Angular CLI app experiencing issues with hot reload functionality

My existing angular cli application has been dockerized with the following setup: Dockerfile at root level: # Create a new image from the base nodejs 7 image. FROM node:7 # Create the target directory in the imahge RUN mkdir -p /usr/src/app # Set the cr ...

execute an npm script from a separate repository

I am looking to run an npm run script from repository A within repository B (both are locally cloned). In repository A, the script is defined in package.json as follows: "scripts": { "my-script": "node my-script.js" } The script can be launched using ...

The npm-cache is packed with hundreds of pre-installed packages

After installing node.js and npm on my new Windows 7 machine via the msi installer, I discovered a cache of 150 packages in my users//appdata/roaming/npm-cache directory. How did they end up there? It doesn't seem like the msi installer did it. I&apo ...

"An error occurred while trying to push to the stream after reaching the end of file" during the execution of the "npm cache verify

Every time I attempt to run "npm cache verify," an error message pops up: 0 info it worked if it ends with ok 1 verbose cli ['/home/noderuntime/output/bin/node', 1 verbose cli '/home/noderuntime/output/bin/npm', 1 verbose cli 'cac ...

Encountering an NPM error while trying to install particle.js within a React

Encountering this error while attempting to install particle.js on my React App: Error ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfe ...

Starting the Appium server on Mac is proving to be challenging with the "Appium &" application

I have successfully downloaded all the necessary tools and set up the environment variable on my system running macOS Mojave version 10.14.3. Specifically, I have installed node, appium, and wd using the following commands: brew install node npm install - ...

Encountering a style-loader error while trying to upgrade to Angular 15 using @angular-builders/custom-webpack

Check out my demo repository at the following link: https://github.com/OrShalmayev/style-loader-error After upgrading my Angular project from version 12 to 15, I encountered an issue with my angular.json file configuration: "architect": { &q ...

The stability of Vagrant is influenced by the specific configuration of the physical

Managing a virtual machine with Vagrant has been quite a task. The process involves updating the system (Ubuntu) using apt-get, installing Node.js with nvm, and running npm install for different modules. However, some strange occurrences have been observed ...

Which is better: specifying Node.js version with nvmrc or in package.json engines

Ensuring that other developers working on my JavaScript project use specific versions of node and npm is important to me. I recently added the following code snippet to my package.json file: "engineStrict" : true, "engines": { "node" : "10.10.0", ...

Alert: Module 'events' in base/lib is not found

Whenever I try to run Ghost 0.5.0, an error message pops up saying ERROR: Cannot find module './lib/base/events'. I've tried uninstalling and reinstalling the events module multiple times with the -g flag, but it still doesn't seem to ...

Upon updating my application from Angular 14 to 16, I encountered an overwhelming number of errors within the npm packages I had incorporated

After upgrading my angular application from v14 to v16, I encountered numerous peer dependencies issues, which led me to use the --force flag for the upgrade process. However, upon compiling, I am now faced with a multitude of errors as depicted in the scr ...

Can Node.js be successfully installed on an Ubuntu Server 20.04 running on a virtual environment?

Struggling with the installation of NodeJs and NPM on Ubuntu Server 20.04 in a Virtual Machine. The unpacking process seems to be taking an unusually long time compared to when I installed it on my physical computer running Ubuntu Desktop 20.04. Is there a ...