Encountering issues with npm installation when running `eb create` on Node version 6.2.2

Is anyone else encountering this problem?

1620 verbose unsafe-perm in lifecycle false
1621 info <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="385a4d5e5e5d4a4d4c51547809160a1609">[email protected]</a> Failed to exec install script
1622 verbose stack Error: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b9dbccdfdfdccbcccdd0d5f988978b9788">[email protected]</a> install: `node-gyp rebuild`
1622 verbose stack Exit status 1
1622 verbose stack at EventEmitter.<anonymous> (/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
1622 verbose stack at emitTwo (events.js:87:13)
1622 verbose stack at EventEmitter.emit (events.js:172:7)
1622 verbose stack at ChildProcess.<anonymous> (/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:24:14)
1622 verbose stack at emitTwo (events.js:87:13)
1622 verbose stack at ChildProcess.emit (events.js:172:7)
1622 verbose stack at maybeClose (internal/child_process.js:827:16)
1622 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
1623 verbose pkgid <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aac8dfcccccfd8dfdec3c6ea9b8498849b">[email protected]</a>
1624 verbose cwd /tmp/deployment/application
1625 error Linux 4.4.14-24.50.amzn1.x86_64
1626 error argv "/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/bin/npm" "--production" "install"
1627 error node v4.4.6
1628 error npm v2.15.5
1629 error code ELIFECYCLE
1630 error <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c0a2b5a6a6a5b2b5b4a9ac80f1eef2eef1">[email protected]</a> install: `node-gyp rebuild`
1630 error Exit status 1
1631 error Failed at the <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0f6d7a69696a7d7a7b66634f3e213d213e">[email protected]</a> install script 'node-gyp rebuild'.
1631 error This is most likely a problem with the bufferutil package,
1631 error not with npm itself.
1631 error Tell the author that this fails on your system:
1631 error node-gyp rebuild
1631 error You can get information on how to open an issue for this project with:
1631 error npm bugs bufferutil
1631 error Or if that isn't available, you can get their info via:
1631 error
1631 error npm owner ls bufferutil
1631 error There is likely additional logging output above.
1632 verbose exit 1, true 

/var/log/eb-activity.log
Running npm with --production flag
Failed to run npm install. Snapshot logs for more details.
Traceback (most recent call last):
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 695, in <module>
main()
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 677, in main
node_version_manager.run_npm_install(options.app_path)
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 136, in run_npm_install
self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
raise e
subprocess.CalledProcessError: Command '' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install

<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ccaeb9aaaaa9beb9b8a5a08cfde2fee2fd">[email protected]</a> install /tmp/deployment/application/node_modules/bufferutil
node-gyp rebuild

gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! stack at Error (native)
gyp ERR! System Linux 4.4.14-24.50.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v4.4.6-linux-x64/lib/node_modules/npm/node_modules/node-gy...

Answer №1

Simply by including node_modules/ in .ebignore, the issue was resolved.

Node.js deployment failing on Amazon Elastic Beanstalk because of directory permissions

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

Removing users from a Socket.IO chat room using Node.js

I am facing an issue with removing users from Socket.IO when their browser is closed. The 'user' in the array 'users[]' is not getting removed or updated. Additionally, I would like to update the users on the client side as well. Can so ...

Executing a function in Node-Express with a database connection at the beginning of the application

I am relatively new to Node.js and currently working on a Node.js - Express solution as a back-end for an AngularJS web application. My goal is to send an email when the MSSQL database query returns specific information. I have successfully implemented thi ...

Newbie's guide: Configuring local host for Angular app with XAMPP on Windows 7

I recently transitioned my Angular App from running on a Local host using Visual Studio IIE server to testing it locally with XAMPP. As a beginner, I am encountering difficulties in getting the local host to recognize the HTML initialization file. Despite ...

How to speed up file listing in Node.js using FS module?

I'm trying to retrieve file names from a directory: const fs = require('fs'); fs.readdir("repo/_posts", (err, files) => { files.forEach(file => { res.write(file + "\n"); }); }) Even with only 15 files, ...

What is the process for adding a sub-package from a forked lerna repository as a node dependency?

Is there a way to access packages from within a GitHub dependency added using yarn add slbox/someproject#master? Specifically, for a project structure like this one: someproject\ packages\ someproject\ someproject-utils& ...

Node.js API authentication: securing your authentication process

I am currently working on implementing authentication in nodeJs using passport and jwt. I have successfully created an API that functions properly when tested in Postman. However, I am facing some challenges when trying to display error messages on the fro ...

Installing the error package resulted in the following error: "Error: module 'nopt' not found."

After attempting to install node modules, I encountered the error message "Error: cannot find module 'nopt'." I tested various solutions, but none of them seemed to work. The image below shows the attached error message. { "name": "server", ...

There is an issue as headers cannot be changed after being set for the client

I am in the process of developing an employee leave management system. Everything runs smoothly until an issue arises when attempting to update the leave status as an admin, and the logged-in account or user does not have admin privileges. There is a midd ...

"Reasons Why I'm Unable to Retrieve the Length of an Array

Can someone lend a hand with finding the array length? I attempted to utilize Object.keys for this task { "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#sites('volagas.sharepoint.com')/sites('volagas.sharepoint.com%2C9 ...

Having trouble running `npm start` in React due to a `npm update check failed` error

When attempting to open a window to view my React app using npm start, I encounter the following error: npm update check failed │ │ Try running with sudo or get access │ │ ...

Troubleshooting CSS pathing problem in Node.js web app hosted on A2 Hosting

I am currently learning node.js and still relatively new to it. Please excuse me if my first question is inefficient or poorly formatted. I am trying to upload a one-page test to explore A2's node.js service. Following tutorials from A2 on creating a ...

How to set up and utilize an npm (Node.js) module on a Windows 2008 server

Looking for some guidance - how can I fix this issue? Everything is running smoothly on my Windows 7 laptop, but encountering errors on the Windows 2008 server. Here's what's set up: 1. ASP.NET Core App and NodeServices being used on Windows Ser ...

npm audit fix failing to reflect changes in package.json

After numerous attempts, I have finally found a fix for one vulnerability using npm audit fix. The npm audit report indicates: # Run npm update mkdirp --depth 8 to resolve 10 vulnerabilities ┌───────────────┬── ...

Personalize your Bulma experience using node-sass: resolving the npm init entry point dilemma

According to the documentation from Bulma (), it suggests running npm init and inputting sass/mystyles.scss as the entry point when prompted. However, I have come across information (What is "entry point" in npm init) suggesting that the entry po ...

Doing server side function calls from the client in NodeJs

I recently embarked on a journey to learn web development and am eager to make server-side data changes when invoking client functions. Take a look at my sample server setup: const fs = require('fs'); const path = require('path'); con ...

Which is quicker: reading two files with fs.readFile or using fs.readFileSync?

During the 5:40 mark of this video, it is mentioned that the non-blocking version (using fs.readFile instead of fs.readFileSync) reads files in parallel, resulting in faster execution. But how could this be possible if Node.js operates on a single thread? ...

I encounter numerous node errors every time I try to use node

It seems like there may be issues with node-related files on my machine, so I'm considering deleting everything related to it. Before doing so, I want to confirm. While attempting to create a script with commander, I ran npm install -g at one point. ...

NodeJs google analytics reporting API returning null response object

Just getting started with a question. In my project, I am utilizing NodeJS to interact with the Google Analytics Reporting API. I have successfully obtained the necessary OAuth 2 token and even receive a 200 response when querying the API. However, instea ...

Difficulty installing yarn for repositories using git+https on Jenkins leads to issues

I'm currently setting up my project on Jenkins to trigger an automatic build for every commit. However, I'm encountering an issue when trying to run yarn install using a NodeJS script in Jenkins. It fails to install the dependencies that are bein ...

The property slider in the d3 slider package is not found in the type 'types of d3'

I attempted to integrate a d3 slider into my d3 chart in Angular 2. I installed the d3slider package using the command: npm install --save @types/d3.slider. However, when trying to access the method "d3.slider()", an error occurred stating that "property ...