AWS tutorial permission denied on Mac OS
# support
m
I'm trying to set up medplum on AWS to run a demo. I came across your tutorial https://www.medplum.com/docs/self-hosting/install-on-aws . When I run
sudo npx medplum aws init
, I get the error
Copy code
sh: /.../my-medplum-cdk-config/node_modules/.bin/medplum: Permission denied
. I don't think this is a medplum-specific issue, but I was hoping you may be able to point me in the right direction. - I checked the file permissions were correct. - My AWS config file is set up. - It was suggested to me to check system logs (not sure where) or run npx in a more verbose mode (I can't seem to find a verbose flag or anything about logs on their documentation). Running MacOS Ventura 13.4
Ok, so -verbose does something. Doesn't appear to be anything helpful there but it does show me a logfile.
Copy code
cat /Users/mona/.npm/_logs/2023-08-25T16_54_00_334Z-debug-0.log 
0 verbose cli /Users/mona/.nvm/versions/node/v20.5.1/bin/node /Users/mona/.nvm/versions/node/v20.5.1/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@9.8.0
2 info using node@v20.5.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/Users/mona/.nvm/versions/node/v20.5.1/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 0ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:/Users/mona/.../my-medplum-cdk-config/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/Users/mona/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/Users/mona/.nvm/versions/node/v20.5.1/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 0ms
16 timing config:load Completed in 5ms
17 timing npm:load:configload Completed in 5ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm exec medplum aws init
22 verbose argv "exec" "--loglevel" "verbose" "--" "medplum" "aws" "init"
23 timing npm:load:setTitle Completed in 5ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:/Users/mona/.npm/_logs/2023-08-25T16_54_00_334Z-
26 verbose logfile /Users/mona/.npm/_logs/2023-08-25T16_54_00_334Z-debug-0.log
27 timing npm:load:logFile Completed in 4ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 24ms
31 silly logfile start cleaning logs, removing 2 files
32 silly logfile done cleaning log files
33 timing command:exec Completed in 15ms
34 verbose exit 126
35 timing npm Completed in 154ms
36 verbose code 126
Doesn't seem too helpful to me
trying to
chown
the directory with no success yet.
d
did you try
chmod +x /.../my-medplum-cdk-config/node_modules/.bin/medplum
? I've seen this happen with npm installed binaries on Unix systems sometimes. not sure what causes it
m
no because the x was already there
I am planning on resetting my node env
r
hi @mona01385 - just wanted to check in to see if you were able to make progress
m
Oh, hello, this was de-prioritized so it's no longer on my plate, but I have the suggestion to check Mac OS permissions as well, which I'll have to check if it comes up again. But for the moment we are not working on it.
156 Views