marvincaspar
Repos
36
Followers
23
Following
10

Events

issue comment
Cloudflare Pages with Functions

I get an error if I try to generate a nuxt app with NITRO_PRESET=cloudflare_pages.

ERROR  Cannot find module '/Users/mca/dev/private/nuxt-cloudflare/functions/index.mjs' imported from /Users/mca/dev/private/nuxt-cloudflare/node_modules/nitropack/dist/shared/nitro.ce47800e.mjs                  07:26:15

  at new NodeError (node:internal/errors:387:5)
  at finalizeResolution (node:internal/modules/esm/resolve:429:11)
  at moduleResolve (node:internal/modules/esm/resolve:1006:10)
  at defaultResolve (node:internal/modules/esm/resolve:1214:11)
  at nextResolve (node:internal/modules/esm/loader:165:28)
  at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
  at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
  at ESMLoader.import (node:internal/modules/esm/loader:528:22)
  at importModuleDynamically (node:internal/modules/esm/translators:110:35)
  at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Repo to reproducte the error https://github.com/marvincaspar/nuxt-cloudflare.

There is already an issue in nuxt framwork https://github.com/nuxt/framework/issues/7402

Created at 2 weeks ago

Cleanup dependencies

Created at 2 weeks ago
issue comment
Cloudflare worker build error

Hi @danielroe, I could reproduce the issue from @mehotkhan. There is an other issue if you use cloudflare_pages as nitro preset. Is this the right place for this issue or should it be moved to https://github.com/unjs/nitro?

Here's the repo https://github.com/marvincaspar/nuxt-cloudflare

Created at 2 weeks ago
marvincaspar create branch main
Created at 2 weeks ago
create repository
marvincaspar create repository
Created at 2 weeks ago
issue comment
Cloudflare worker build error

I have tried to reproduce it with a clean project and that worked. I than added more and more modules and configuration and the error appears after adding the nuxt image module. Seems like there is already an issue open https://github.com/nuxt/image/issues/602

Created at 3 weeks ago
issue comment
Cloudflare worker build error

I have a similar issue. NITRO_PRESET=cloudflare yarn build works fine for me.

Than I have tried to start the server with node and miniflare and both options throws an error.

  • Node: node .output/server/index.mjs throws ReferenceError: addEventListener is not defined
  • npx miniflare .output/server/index.mjs --site .output/public throws ReferenceError: __dirname is not defined
Created at 3 weeks ago
opened issue
[Bug]: Force https for apollo client

Expected Behavior

The protocol which is used for the apollo client should be configurable and not forced to https.

I know you only should communicate with https for secure communication, but in our current environment we are hosting magento and vue storefront inside a k8s cluster. Communication from the internet is https, but communication within the cluster is http because we are already in a secure environment.

Actual Behavior

Apollo client is created with https agent

https://github.com/vuestorefront/magento2/blob/a9864faf9239667c81a4d6275e0cf4716dfb7b05/packages/api-client/src/helpers/magentoLink/graphQl.ts#L21 https://github.com/vuestorefront/magento2/blob/a9864faf9239667c81a4d6275e0cf4716dfb7b05/packages/api-client/src/helpers/magentoLink/graphQl.ts#L74

Possible Solution

Make the agent configurable or update the documentation how to change this to a http agent. I found a workaround/solution by overwriting the apollo config in the middleware.config.js file:

module.exports = {
  integrations: {
    magento: {
      configuration: {
        customApolloHttpLinkOptions: {
          useGETForQueries: true,
          fetchOptions: {},
        },
        ...
      },
      ...
    },
  },
};

Steps to reproduce

No response

What version of Magento 2 integration are you using?

1.0.2

What version of Node.js are you using?

16

What browser (and version) are you using?

What operating system (and version) are you using?

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct
Created at 3 weeks ago
issue comment
Loading SVG as inline

My issue is, that the svgs are stored in storyblok and I just receive the url

Created at 1 month ago
opened issue
Loading SVG as inline

Hi,

it would be great if there is an option for svgs to load them inline instead of just loading it via the img tag. Then you have the option to set css stuff like fill color and you reduce the http requests. My current solution is to fetch the img src, get the response text and than output it into a span tag but it would be nice if this is part of the nuxt image.

Created at 1 month ago
Created at 2 months ago

Update README.md

Created at 2 months ago