average-australia-85137
05/23/2022, 7:49 PMnpm install
and then npm run build
in two separate processes. I currently have the node_modules
set as the output_digest for the first process, but when I access it all of the symlinks in the ./node_modules/.bin/
directory are materialized to real files. but since they all reference files relative to the linked location it doesn't work!
is there anything I can do there? I'd like to have the process results cached since installing the dependencies can take a while and doesn't change?witty-crayon-22786
05/23/2022, 8:15 PMbut when I access it all of the symlinks in thenot sure what you mean here… the captured files should be “real files” with content, so i’m not sure what you mean by the linked location not existing… there shouldn’t be any links leftdirectory are materialized to real files. but since they all reference files relative to the linked location it doesn’t work!./node_modules/.bin/
average-australia-85137
05/23/2022, 8:19 PMwide-midnight-78598
05/23/2022, 9:05 PMProcess
path, but couldn't find the right magic to get this running.wide-midnight-78598
05/23/2022, 9:05 PMwitty-crayon-22786
05/23/2022, 9:08 PMand they load javascript files relative to the original location of the file (what the symlink pointed to originally)... does that make sense?yea, it does. but doesn’t that mean that you need to capture more files from the sandbox? afaict, it’s not to do with the symlink itself… just ensuring that you’re capturing “enough” of the sandbox
witty-crayon-22786
05/23/2022, 9:11 PMWhat you’re describing here is currently why I have to do this dirty little hack@wide-midnight-78598: what is the hack in there? i’m not seeing it…
average-australia-85137
05/23/2022, 9:13 PMnpm install --no-bin-links
so it doesn't like.... accidentally work sometimes)
@witty-crayon-22786 so I'm including all those files - but for example
node_modules/.bin/nuxt
has something like
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
in the original process - the nuxt script is a symlink to node_modules/nuxt/bin/nuxt
(or something) and so from that directory ../package.json
resolves, but once I get the output_digest that symlink is a real file and ../package.json
is looking in a different place where it doesn't exist!witty-crayon-22786
05/23/2022, 9:13 PMaverage-australia-85137
05/23/2022, 9:15 PMscripts
object in `package.json`:
"pants:build": "node ./node_modules/nuxt/bin/nuxt.js build"
which is equivalent (as far as I can tell) to:
"pants:build": "nuxt build"
But is not like... what people are used to doingwide-midnight-78598
05/23/2022, 9:16 PMwitty-crayon-22786
05/23/2022, 9:17 PMwide-midnight-78598
05/23/2022, 9:17 PMaverage-australia-85137
05/23/2022, 9:18 PMwitty-crayon-22786
05/23/2022, 9:18 PMwide-midnight-78598
05/23/2022, 9:19 PMaverage-australia-85137
05/23/2022, 9:22 PMwide-midnight-78598
05/23/2022, 9:25 PMaverage-australia-85137
05/23/2022, 9:30 PMwide-midnight-78598
05/24/2022, 1:59 AMnpx
to run in lieu? Doesn't solve your problem, but it's what i ended up doing for the Prettier pluginaverage-australia-85137
05/24/2022, 3:11 AMnuxt build
doesn't work but node node_modules/nuxt/bin/nuxt.js build
does work!)average-australia-85137
05/27/2022, 8:04 PMwide-midnight-78598
05/27/2022, 8:25 PMaverage-australia-85137
05/27/2022, 8:26 PMwide-midnight-78598
05/27/2022, 8:26 PMaverage-australia-85137
05/31/2022, 8:27 PMwide-midnight-78598
05/31/2022, 8:55 PM