adopted-ember-addons / ember-cli-ifa

Ember CLI addon for injecting fingerprinted asset map file into Ember app
MIT License
56 stars 53 forks source link

Error: ENOENT: no such file or directory, open '/...broccoli_merge_trees/assets/assetMap.js' #245

Open adambedford opened 3 years ago

adambedford commented 3 years ago

I'm running into an issue using this addon with Fastboot, whereby I'm getting the following error:

Error: ENOENT: no such file or directory, open '/var/folders/5t/y4lxls052bn3ty70r4n7t5b00000gn/T/broccoli-36766MWDqPCH7NGuv/out-1103-broccoli_merge_trees/assets/assetMap.js'
    at Object.openSync (fs.js:440:3)
    at Object.readFileSync (fs.js:342:35)
    at /Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/ember-app.js:189:27
    at Array.forEach (<anonymous>)
    at EmberApp.loadAppFiles (/Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/ember-app.js:187:21)
    at EmberApp.retrieveSandboxedApp (/Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/ember-app.js:235:10)
    at new EmberApp (/Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/ember-app.js:61:21)
    at FastBoot._buildEmberApp (/Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/index.js:114:17)
    at new FastBoot (/Users/adam/Projects/tutors/frontend/node_modules/fastboot/src/index.js:52:10)
    at /Users/adam/Projects/tutors/frontend/node_modules/ember-cli-fastboot/index.js:335:29
    at Layer.handle [as handle_request] (/Users/adam/Projects/tutors/frontend/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/adam/Projects/tutors/frontend/node_modules/express/lib/router/index.js:317:13)
    at /Users/adam/Projects/tutors/frontend/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/Users/adam/Projects/tutors/frontend/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/adam/Projects/tutors/frontend/node_modules/express/lib/router/index.js:275:10)
    at /Users/adam/Projects/tutors/frontend/node_modules/ember-cli/lib/tasks/server/middleware/broccoli-watcher/index.js:54:11
    at watcher.then.errorHandler.buildError (/Users/adam/Projects/tutors/frontend/node_modules/broccoli-middleware/lib/watcher-middleware.js:35:7)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

In environment.js, we have:

ifa: {
      enabled: false,
      inline: true
    }

And in ember-cli-build.js, we have:

fingerprint: {
      prepend: 'https://cdn.tutorspot.co.uk/',
      extensions: [...],
      exclude: [...],
      generateAssetMap: true,
      fingerprintAssetMap: true
    },

This error is only showing up in Fastboot. Everything works fine running locally with Fastboot disabled.

Any guidance would be greatly appreciated!

betocantu93 commented 2 years ago

Hello @adambedford, do you found a solution for this?