error encountered during npm package installation due to permission problem

During the installation of [email protected], I encountered this error message:

Error: Error: EACCES: permission denied, mkdir '/var/www/acceptance/node_modules/admin-lte/plugins'.

Can someone please assist me in resolving this permission issue?

Full Error Log:

ubuntu@ip-XXX-XX-X-XX:/var/www/acceptance$ sudo npm install
npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b4c4dbc4c4d1c69adec7f4859a85829a85">[email protected]</a>: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
......... (remaining logs abbreviated for brevity)
.
.
.
┌──────────────────────────────────────────────────────────┐
│                 npm update check failed                                                                                             
│           Try running with sudo or get access            
│           to the local update config store via           
│ sudo chown -R $USER:$(id -gn $USER) /home/ubuntu/.config 
└──────────────────────────────────────────────────────────┘

package.json

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "axios": "^0.19",
        "bootstrap": "^4.0.0",
        "cross-env": "^7.0",
        "jquery": "^3.2",
        "laravel-mix": "^5.0.1",
        "lodash": "^4.17.13",
        "popper.js": "^1.12",
        "resolve-url-loader": "^3.1.0",
        "sass": "^1.15.2",
        "sass-loader": "^8.0.0",
        "vue-template-compiler": "^2.6.11"
    },
    "dependencies": {
        "admin-lte": "^3.0.5"
    }
}

Answer №1

To change ownership of the /home/ubuntu/.config directory in your project, execute the following command on the terminal:

sudo chown -R $USER:$(id -gn $USER) /home/ubuntu/.config

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

Running NPM install encounters difficulty when trying to access a private repository

npm login. I fill in my username, password, and email then successfully log in. I make a change to a package. After running npm publish, the (org) package is published, and I can view it on the NPM website when logged in. 5. However, attempting to install ...

Utilize postcss to monitor and combine various css files into a bundle named bundle.css

I am currently exploring a workflow with postcss where I want to organize my css partials in one folder, monitor them, and generate a single bundle css file. This bundle css file should include a base.css file at the top. Although postcss has a --watch fl ...

Develop a CakePHP CRUD view using a JavaScript framework

Creating a CRUD view in Cake PHP is simple with the following command: bin/cake bake all users This command builds the users table for CRUD operations. Is there a JavaScript framework that offers similar simplicity? ...

Encountering a Node-gyp Issue while using Windows 10

I've set up a repository at https://github.com/maximusnikulin/react-gulp-boilerplate After cloning it to my local disk, I run npm install to install all the necessary packages. While this process runs smoothly on Windows 7, I encounter an error on W ...

Issues with Angular Structural Directives arising from NPM installation concerns are causing problems

I have developed an npm package called sezam-shareds To integrate the package into a new project, you need to follow these steps: Add the following component from the package: <sezam-overflow [show]="true"></sezam-overflow> to a compo ...

Encountered a 401 error while attempting to push updates to npm registry

I've encountered an issue while trying to publish my package on npm. Even though I am logged in as a user with the proper access permissions for that package, I'm facing difficulties. Upon logging in, I executed the following command to confirm ...

I keep encountering the same issue every time I try to execute the npm run watch command. Does anyone have any suggestions on how to fix this?

When attempting to execute the command npm run watch, I encountered an error as shown below: ERROR Failed to compile with 1 errors2:50:28 PM This dependency was not found: * vue in ./resources/js/app.js To install it, you can run: npm install --save vue ...

What is the process for installing gulp-cli version 4.0?

Need help with the gulp-cli installation. npm install -g "gulpjs/gulp-cli#4.0" Experiencing an error message: npm ERR! code 1 npm ERR! Command failed: C:\Program Files\Git\mingw64\bin\git.EXE checkout 4.0 npm ERR! error: pathspe ...

When attempting to run the Hugo command with the production environment, an error occurred stating "Unknown: command not found" on line 136 in the

My development setup includes hugo, doks, and GitLab. In my repository, I have the following configuration in the .gitlab-ci.yml file: --- image: node:latest variables: HUGO_ENV: production GIT_SUBMODULE_STRATEGY: recursive before_script: - npm ins ...

Error: Attempting to use a class as a function is not possible in stenciljs

While working on my Stencil project, I encountered an error when trying to use the multiselect-react-dropdown package. I have searched for solutions specifically for React but none of them seemed to work. Can anyone provide assistance on implementing thi ...

Update NPM automatically in Bash/GitBash only when a newer version is detected

Is there a way to automatically check for the availability of a new stable version of NPM online without manually opening a browser? If a newer version is found and it's greater than what I currently have installed globally, then I want to run the com ...

Apologies, but the development JavaScript bundle could not be generated due to an unexpected token error with code #981

After cloning my repository and installing all packages via npm, I encountered an error when trying to start my program with gatsby develop. The error appears in all files within the templates directory. https://i.stack.imgur.com/MsAUm.png I've atte ...

Having trouble launching tmux due to an error with NPM/NVM: nvm is in conflict with the npm configuration "prefix" setting, which is currently empty

Every time I try to initiate a new tmux session using tmux, tmux new, or tmux new-session, I encounter the following error message: module.js:549 throw err; ^ Error: Cannot find module '../lib/utils/unsupported.js' at Function.Modul ...

Creating an npm package that includes an entire Vue.js application - where to begin?

Can a complete Vue.js application be packaged into an npm package? The documentation I've found only covers packaging individual components, not entire applications. I'm interested in importing a Vue.js app as a web component within another appl ...

Is there a solution to prevent fsevents warnings from appearing?

While delving into the realm of React and utilizing npm, I often encounter these types of warnings: > npm install axios redux react-redux redux-thunk react-router-dom validator redux-form npm WARN optional SKIPPING OPTIONAL DEPENDENCY: <a href="/cdn ...

The error message in Intellij states that the gulp tool cannot be found in your

Currently working on a project in IntelliJ that relies on Gulp. Encountering an error after debugging, the error message reads: | Error Error executing script RunApp: java.lang.RuntimeException: Problem executing execUiBuild. standard out: 'Inst ...

Error message saying "Firebase not defined after Ember CLI installation using npm"

After completing the necessary steps in the command line to set up Ember CLI, Firebase, and EmberFire using node, I encountered an issue where Firebase is not defined in app/adapter/application.js npm install -g ember-cli npm install -g bower npm instal ...

After running the `npm run build` command in a Svelte (not Svelte Kit) application, the index.html file displays as

When I run the npm run dev server, it displays the default counter app that is built. However, if I build a plain HTML, CSS, and JavaScript project using npm run build in the dist folder, then open the index.html file, it shows a blank page even though the ...

Encountered a problem while trying to add npm package to a Next.JS project

Looking for some assistance with installing an npm package called react-mic. My aim is to enable user audio recording and display the wavelength pattern. I've encountered an error, and you can see my logs and package.json in the provided image. Any he ...

Karma encountered an error while trying to resolve the file path for "../../services/service.ts" in the preprocessor.rollup

Currently, I am facing an issue while trying to test a testsuite using CI (Bamboo). The problem arises when deploying the fully functional application from my local system to the Bamboo server (which I do not have configuration access to). The call npm -- ...