There’s something going on with the VTEX project that I cloned, I can’t link it in order to see the changes made on my workspace, even if I’m logged and have the workspace. The app isn’t successfully linked.
When I try to link my app with vtex link
it gives me the following error:
Failed to generate graphql operation types vtex.builder-hub@0.281.
I have tried several things like running Integration Settings on my admin panel (/admin/search/integration-settings
).
Help!
1 Like
Hi @Ninnadev, welcome to VTEX Community!
If possible, please give more information on the project you cloned and why you decided to try going through Integration Settings on your admin.
If not, could you at least share the full terminal output for us to take a look at? That will make it easier to understand what might be breaking in your project.
Hi @georgebrindeiro
I decided to go through Integration Settings on my admin as a desperate attempt to solve the problem, just because I saw it as an option in other posts.
The projects I cloned are from discoargentina
and veaargentina
, and I’m trying to link them in order to make modifications on development branches and then launch them to production. But it’s getting difficult for me because it’s the first time that I work with VTEX. I’ve been reading lots of documentations about VTEX and following all the steps to run the app but nothing has worked.
After installing the VTEX Toolbelt CLI, cloned the project, switch to develop branch, login from the terminal with: vtex login
, create a new workspace, when I try to link the app with: vtex link
, the following logs with errors are display:
$ vtex link
12:59:41.168 - info: Running yarn in react
yarn install v1.22.11
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.33s.
12:59:42.155 - info: Finished running yarn
12:59:42.156 - info: Running yarn in node
yarn install v1.22.11
warning package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.30s.
12:59:43.089 - info: Finished running yarn
12:59:43.090 - info: Linking app jumboargentinaqadisco.store-theme@2.1.4
12:59:43.679 - info: Sending 749 files
12:59:44.951 - info: Link ID: 2cd7e2dfa71d67ec
12:59:44.951 - info: Project size: 8.46MB
12:59:44.951 - info: Compressing project files...
12:59:46.584 - info: Compressed project size: 4.98MB
12:59:49.831 - info: Sending files: 13% - 0.64MB/4.98MB
12:59:50.883 - info: Sending files: 45% - 2.24MB/4.98MB
12:59:51.899 - info: Sending files: 81% - 4.01MB/4.98MB
12:59:52.358 - info: Sending files: 100% - 4.98MB/4.98MB
12:59:53.394 - info: Build accepted for jumboargentinaqadisco.store-theme@2.1.4 at discoargentina/pruebadisco vtex.builder-hub@0.281.0
12:59:53.472 - info: Starting build for app jumboargentinaqadisco.store-theme@2.1.4 vtex.builder-hub@0.281.0
12:59:55.464 - warn: Failed to generate graphql operation types vtex.builder-hub@0.281.0
12:59:56.865 - warn: Failed to generate graphql operation types vtex.builder-hub@0.281.0
12:59:58.356 - warn: Failed to generate graphql operation types vtex.builder-hub@0.281.0
12:59:58.393 - warn: Blocks 'flex-layout.row#icon-volver,image#icon-volver,rich-text#volver-tutorial-compra' were defined twice, this could cause unexpected behavior. Please check your json files and remove duplicated block definitions. vtex.builder-hub@0.281.0
12:59:58.480 - warn: node builder overrode the following options in tsconfig.json:
target: 'es2017' => 'es2019'
outDir: 'service' => '/cache/link/link_discoargentina_pruebadisco/jumboargentinaqadisco.store-theme@2.1.4/dist/service-node/app' vtex.builder-hub@0.281.0
12:59:58.544 - warn: Building .js project using React 3.x builder, skipping type check. Please consider migrating to TypeScript. vtex.builder-hub@0.281.0
13:00:09.460 - error: App build failed. Waiting for changes...
13:00:10.004 - error: Webpack for react@3.x builder finished in 7955ms with errors:
./react/Components/Contact/FormFields/Name.js
Module not found: Error: Can't resolve '../Contact.global.css' in './react/Components/Contact/FormFields'
resolve '../Contact.global.css' in './react/Components/Contact/FormFields'
using description file: ./react/package.json (relative path: ./Components/Contact/FormFields)
Field 'browser' doesn't contain a valid alias configuration
using description file: ./react/package.json (relative path: ./Components/Contact/Contact.global.css)
no extension
Field 'browser' doesn't contain a valid alias configuration
./react/Components/Contact/Contact.global.css doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
./react/Components/Contact/Contact.global.css.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
./react/Components/Contact/Contact.global.css.js doesn't exist
.jsx
Could you share the contents of your package.json
file? Looks like this Stack Overflow answer might help us fix the issue with the browser
variable, but we need to take a look at what’s in it.
Ok, here it is:
{
"name": "cencosud-disco",
"version": "0.0.1",
"scripts": {
"sass": "concurrently \"sass --watch --no-source-map styles/sass:styles/css\" \"sass --watch --no-source-map react/styles:react\"",
"checkout": "concurrently \"sass --watch --no-source-map checkout-ui-custom/sass:checkout-ui-custom\"",
"build": "concurrently \"sass styles/sass:styles/css\" \"sass react/styles:react\" \"vtex release\""
},
"browserslist": [
"last 1 version",
"> 1%",
"maintained node versions",
"not dead"
],
"devDependencies": {
"concurrently": "^5.0.0",
"sass": "^1.32.8"
},
"private": true,
"dependencies": {
"global": "^4.4.0",
"minimist": "^1.2.5",
"vtex": "^2.128.0"
}
}
I don’t see any browser
variable there, so I guess I misunderstood the error message. Do you see where that variable is used and/or declared in the ./Components/Contact/FormFields
file?