I am trying to deploy hydrogen based application using vercel.
I have selected Framework Preset as hydrogen while creating project.
Error that I am getting is
[![enter image description here][1]][1]
And if i check log its saying
[GET] /
14:35:45:13
ReferenceError: Oxygen is not defined
at worker.js:565:22163
at worker.js:159:2014
at worker.js:2388:12955
Any idea how to fix this?
[1]: https://i.stack.imgur.com/qZeq0.png
For anyone facing same issue. In hydrogen.config.js we are checking for Oxygen env. So removing that will fix this ( if you are deploying on non oxygen env )
After edit it will look like this
import {defineConfig, CookieSessionStorage} from '#shopify/hydrogen/config';
export default defineConfig({
shopify: {
defaultCountryCode: 'US',
defaultLanguageCode: 'EN',
storeDomain: 'xx.myshopify.com', // || Oxygen?.env?.PUBLIC_STORE_DOMAIN,
storefrontToken: 'xxx', // Oxygen?.env?.PUBLIC_STOREFRONT_API_TOKEN,
storefrontApiVersion: '2022-07',
},
session: CookieSessionStorage('__session', {
path: '/',
httpOnly: true,
secure: import.meta.env.PROD,
sameSite: 'Strict',
maxAge: 60 * 60 * 24 * 30,
}),
});
Related
i'm using vuejs, nuxtjs implement cookie-universal-nuxt package.Localhost work everything,but the server does not work after refreshing page.
nuxt.config.js
export default {
mode: 'universal',
ssr: true,
target: 'server',
modules: ['cookie-universal-nuxt'],
server: {
port: 4002,
host: 'localhost'
}
}
cart.js
$cookies.set('cart', cookieParams, {
path: '/',
maxAge: 60 * 60 * 24 * 7
});
If you're using babel, try adding the package to the transpile section in your nuxt.config. Some packages don't work in ssr correctly without this, e.g element-ui, #vuebits/bem, etc.
I using Nuxt.js # v2.13.2 and I try to config my project working with ie 11
The doc say:
The default targets of #nuxt/babel-preset-app are ie: '9' in the client build, and node: 'current' in the server build.
Here is my nuxt.config.js
build: {
babel: {
presets({ isServer }, [ preset, options ]) {
// change options directly
options.buildTarget = 'client'
options.targets = {
ie: 11,
}
}
}
}
And my pages
import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);
But it not working in ie 11
[object Error]{description: "Syntax error", message: "Syntax error", name: "SyntaxError", number: -2146827286, stack: "SyntaxError...", Symbol(amplify_default)_i.icdaor5bqh3: undefined, Symbol(extensions)_k.icdaor5bqh3: undefined, Symbol(observable)_j.icdaor5bqh3: undefined, Symbol(react.element)_h.icdaor5bqh3: undefined
How to do that thank.
As far as I can tell, the issue is that the Symbol polyfill does not and cannot support cross-realm native functionality.
More detail here: https://github.com/zloirock/core-js/issues/834
Using vue cli 3 I have a project using harp.gl where I need a webworker to decode map tiles.
My vue.config.js has the following:
module.exports = {
pages: {
app: {
entry: './src/main.js',
filename: 'index.html',
title: 'Contextual Map HARP.GL/Vue',
},
decoder: {
target: "webworker",
entry: "./src/decoder.js",
output: {
filename: "[name].bundle.js",
},
devtool: 'source-map',
...
When I run this I have both the app and the decode.js running as a webworker of type "script" (when inspecting it using Chrome).
However, after upgrading to vue cli 4 the above code does not work, as inspecting it using Chrome the webworker type is text/html and it appears to serve the default index.html. It alomst as if the type: "webworker" is not working the same as with version 3.
I am at loss as how to fix this, the move from vue cli 3 to 4 changed something, but I cannot figure out what to change.
Please help on this. I am using the following cucumber opts:
cucumberOpts: {
backtrace: false,
failAmbiguousDefinitions: true,
failFast: false,
ignoreUndefinedDefinitions: false,
name: [],
snippets: true,
source: true,
profile: [],
require: [
'./features/step_definitions/given.js',
'./features/step_definitions/when.js',
'./features/step_definitions/then.js',
],
snippetSyntax: undefined,
strict: true,
tagExpression: '#Test',
tagsInTitle: false,
timeout: 20000000,
},
https://www.npmjs.com/package/wdio-rerun-service Was recently released specifically for WebdriverIO and it works well with Cucumber Features/Scenarios.
I'm assuming you're using the wdio-cucumber-framework then you can only rerun individual steps a specific number of times, like so:
module.exports = function () {
/**
* The following STEP DEFINITION will run maximum 3 times!
* => 1 actual run + 2 reruns (on failure)
*/
this.Given(/^Your step definition here$/, { wrapperOptions: { retry: 2 } }, () => {
// ...
});
});
!Note: wrapperOptions are step-specific options that are passed to the definition function wrapper. In our case, the retry option. You can read more about it in the Cucumber DOCS.
If you need control over the retry of a test-case, or test-suite, then unfortunately there isn't such a feature yet with Cucumber. But, if you want something like that, maybe use Mocha instead. Here are a few examples.
Add this code to your wdio config file. It will retry the fail test two more time (total 3 time)
specFileRetries: 2,
specFileRetriesDelay: 5,
specFileRetriesDeferred: false,
I'm having trouble with setting up dojo. Anything defined in the dojo config seems to correctly load using the localhost:8080/Scripts/foo.js path. However if I then try to load a module without this, say:
require(['foo'], function (_foo) { });
Then the client fails the request, with the attempted path being localhost:8080/foo.js. Obviously wrong.
What do I need to change?
// Configuration for the dojo AMD module loader
dojoConfig = {
baseUrl: "/Scripts",
packages: [{
name: 'esri',
location: 'esri'
}, {
name: 'dojo',
location: 'dojo/dojo'
}, {
name: 'dojox',
location: 'dojo/dojox'
}, {
name: 'dijit',
location: 'dojo/dijit'
}, {
name: 'jquery',
location: '.',
main: 'jquery-2.0.2'
},
Thanks.
Either of these will solve your problem:
Set dojoConfig.tlmSiblingOfDojo = false.
Define 'foo' as a package with an explicit location.
Have a look at this link : http://dojotoolkit.org/documentation/tutorials/1.6/dojo_config/
Maybe the change from packages to modulePaths would help you.
Otherwise i would define the packages on the ordinary way :
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js"></script>
regards