Stuck here to install this package on an Elastic Beansstalk server instance. Always says permission denied. Any clues?
-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
File "/opt/elasticbeanstalk/containerfiles/ebnode.py", line 180, in npm_install
raise e
subprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v8.15.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: + /opt/elasticbeanstalk/containerfiles/ebnode.py --action npm-install
> [email protected] install /tmp/deployment/application/node_modules/fmerge
> node install.js
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open 'fmerge.min.js'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at Object.<anonymous> (/tmp/deployment/application/node_modules/fmerge/install.js:19:4)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffmpeg-installer/[email protected] (node_modules/@ffmpeg-installer/win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffmpeg-installer/[email protected]: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffprobe-installer/[email protected] (node_modules/@ffprobe-installer/darwin-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffprobe-installer/[email protected]: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffprobe-installer/[email protected] (node_modules/@ffprobe-installer/linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffprobe-installer/[email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffprobe-installer/[email protected] (node_modules/@ffprobe-installer/win32-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffprobe-installer/[email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @ffprobe-installer/[email protected] (node_modules/@ffprobe-installer/win32-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @ffprobe-installer/[email protected]: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/.npm/_logs/2019-03-09T05_24_19_744Z-debug.log
Running npm install: /opt/elasticbeanstalk/node-install/node-v8.15.0-linux-x64/bin/npm
Setting npm config jobs to 1
npm config jobs set to 1
Running npm with --production flag
Failed to run npm install. Snapshot logs for more details.
UTC 2019/03/09 05:24:19 cannot find application npm debug log at /tmp/deployment/application/npm-debug.log
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 '['/opt/elasticbeanstalk/node-install/node-v8.15.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1 (Executor::NonZeroExitStatus)
[2019-03-09T05:24:19.866Z] ERROR [1769] : Command CMD-ConfigDeploy failed!
[2019-03-09T05:24:19.867Z] INFO [1769] : Command processor returning results:
{"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED).../opt/elasticbeanstalk/containerfiles/ebnode.py\", line 180, in npm_install\n raise e\nsubprocess.CalledProcessError: Command '['/opt/elasticbeanstalk/node-install/node-v8.15.0-linux-x64/bin/npm', '--production', 'install']' returned non-zero exit status 1. \nHook /opt/elasticbeanstalk/hooks/configdeploy/pre/50npm.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":1,"events":[{"msg":"Failed to run npm install. Snapshot logs for more details.","severity":"ERROR","timestamp":1552109059867}]}],"truncated":"true"}
[2019-03-10T01:08:29.935Z] DEBUG [7184] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-10T01:08:29.935Z] DEBUG [7184] : Checking if the command processor should execute...
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Checking whether the command is applicable to instance (i-0ec5360233e1caf41)..
[2019-03-10T01:08:29.938Z] INFO [7184] : Command is applicable to this instance (i-0ec5360233e1caf41)..
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Checking if the received command stage is valid..
[2019-03-10T01:08:29.938Z] INFO [7184] : No stage_num in command. Valid stage..
[2019-03-10T01:08:29.938Z] INFO [7184] : Received command CMD-TailLogs: {"execution_data"=>"*", "instance_ids"=>["i-0ec5360233e1caf41"], "data"=>"034dd024-42d1-11e9-86fc-5fe2ff927f0c", "command_name"=>"CMD-TailLogs", "api_version"=>"1.0", "resource_name"=>"AWSEBAutoScalingGroup", "request_id"=>"034dd024-42d1-11e9-86fc-5fe2ff927f0c"}
[2019-03-10T01:08:29.938Z] INFO [7184] : Command processor should execute command.
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Storing current stage..
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Stage_num does not exist. Not saving null stage. Returning..
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2019-03-10T01:08:29.938Z] DEBUG [7184] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2019-03-10T01:08:29.939Z] DEBUG [7184] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2019-03-10T01:08:29.939Z] INFO [7184] : Found enabled addons: ["logstreaming", "logpublish"].
[2019-03-10T01:08:29.941Z] INFO [7184] : Updating Command definition of addon logstreaming.
[2019-03-10T01:08:29.941Z] INFO [7184] : Updating Command definition of addon logpublish.
[2019-03-10T01:08:29.941Z] DEBUG [7184] : Loaded definition of Command CMD-TailLogs.
[2019-03-10T01:08:29.941Z] INFO [7184] : Executing CMD-TailLogs
[2019-03-10T01:08:29.942Z] INFO [7184] : Executing command: CMD-TailLogs...
[2019-03-10T01:08:29.942Z] INFO [7184] : Executing command CMD-TailLogs activities...
[2019-03-10T01:08:29.942Z] DEBUG [7184] : Setting environment variables..
[2019-03-10T01:08:29.942Z] INFO [7184] : Running AddonsBefore for command CMD-TailLogs...
[2019-03-10T01:08:29.942Z] DEBUG [7184] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2019-03-10T01:08:29.942Z] INFO [7184] : Running stage 0 of command CMD-TailLogs...
[2019-03-10T01:08:29.942Z] DEBUG [7184] : Loaded 1 actions for stage 0.
[2019-03-10T01:08:29.942Z] INFO [7184] : Running 1 of 1 actions: TailLogs...