Troubleshooting & FAQ
This guide covers the reviewed GxP Toolkit 2.1.40 source. Check your installed package/version and project overrides when a command behaves differently; these source checks do not establish that a particular registry installation or local browser is working.
Installation Issues
npm install fails with permission errors
Error:
EACCES: permission denied
Solution:
The following commands assume nvm is already installed and available in this shell. If it is unavailable, complete your Node version-manager setup first, then reopen the shell and verify nvm --version; see Getting Started for the required Node/toolchain versions.
# Option 1: Use nvm to manage Node.js (recommended)
nvm install 24
nvm use 24
# Check which installation your shell uses
node --version
npm --version
npm prefix -g
Use a user-managed Node installation for global tooling rather than changing permissions across system directories. The current toolkit uses Vite 8; see Vite’s Node compatibility requirements and Getting Started. npm setup and npm dlx are not npm commands. npm exec supports explicitly selecting the toolkit package.
gxdev command not found
Error:
zsh: command not found: gxdev
Solutions:
- Global install:
npm install -g @gxp-dev/tools
- Or explicitly run the toolkit package with npm exec:
npm exec --package=@gxp-dev/tools -- gxdev init my-plugin
- Or link locally (for toolkit development):
cd gx-devtools
npm link
TUI not available
Error:
TUI bundle not found.
Run "npm run build:tui" in gx-devtools to compile it.
Solution:
# In the gx-devtools repository
npm run build:tui
The dispatcher looks for dist/tui/index.js in the selected toolkit package. For an installed package, check that package's contents/version rather than running a contributor build in an unrelated app directory. The TUI also requires both stdin and stdout to be interactive terminals; a non-TTY run is refused. Use plain CLI commands in scripts/CI, and use gxdev ui or supported --ui startup from a real terminal.
Development Server Issues
SSL Certificate errors
Error:
NET::ERR_CERT_AUTHORITY_INVALID
Solutions:
- Generate certificates:
npm run setup-ssl
# or
gxdev setup-ssl
The helper reuses an existing matching pair in the project .certs directory when present. Otherwise it invokes native mkcert, including local CA installation, then generates localhost/loopback certificates. It updates certificate paths in the project .env when that file exists. This changes local certificate/trust configuration; inspect failures rather than treating the printed setup command as proof of browser trust.
-
Verify the certificate belongs to your local development server. Follow the setup output for the expected local host and trust configuration. A certificate warning for an unexpected host or process is not fixed by accepting it; confirm the URL and server first.
-
Use HTTP instead:
gxdev dev --no-https=true
The explicit =true matters in the current plain CLI: bare --no-https is parsed into a different property from the one the handler reads. The generated dev-http script still uses that bare form. See the CLI reference for the current parser behavior.
Port already in use
Error:
Error: Port 3060 is already in use
Solutions:
- Identify the process and stop your own development server gracefully:
# macOS/Linux
lsof -i :3060
kill <PID> # Only after identifying it as your own server
# Windows
netstat -ano | findstr :3060
taskkill /PID <PID> # Only after identifying it as your own server
- Configure the correct service port and restart it:
# Project .env: keep browser/HMR configuration aligned with the Vite listener
NODE_PORT=3061
# Separate Socket.IO/mock relay listener
SOCKET_IO_PORT=3069
Then restart from the project directory. For an explicit HTTP Vite startup:
gxdev dev --port 3061 --no-https=true
The plain CLI resolves its Vite listener port from --port, then NODE_PORT, then 3000; the managed Vite config's own fallback is 3060. Treat the startup output as authoritative rather than assuming every launch path uses the same default. A CLI-only port override does not rewrite the project .env values used by browser/HMR configuration. The relay uses SOCKET_IO_PORT independently; changing NODE_PORT does not move it. If you change the relay port, restart the browser build/client configuration too and check fixed-origin simulator limitations in Socket Events.
Vite HMR not working
Symptoms:
- Changes don't reflect without refresh
- Console shows HMR disconnect errors
Solutions:
- Check for syntax errors in your Vue files
- Restart dev server:
# In TUI
/stop vite
/dev
# Or Ctrl+C and restart
- If a restart and the reported error point to a stale transform, clear only this project's Vite cache:
rm -rf node_modules/.vite
npm run dev
- Inspect the HMR WebSocket request and configured host/protocol/client port. A page loading successfully does not establish that the browser can reach the HMR endpoint. Check proxy/container port mappings when present.
Build Issues
Build fails with import errors
Error:
Error: Cannot find module '@/components/...'
Solutions:
- Check import paths - ensure they use correct aliases:
// Correct
import MyComponent from "@/components/MyComponent.vue"
// From src/Plugin.vue this adds an unintended extra src/ directory:
import MyComponent from "./src/components/MyComponent.vue"
Relative imports are resolved from the importing file and can be valid; they are not inherently wrong. The managed @ alias points to the project src directory.
-
Check toolkit aliases and any project
vite.extend.jsoverrides -
Check file exists at the specified path
CSS not included in build
Symptoms:
- Styles missing in production
- Components unstyled
Solutions:
- Check that the component importing the styles is reachable from the entry. Scoped styles control selector scope; they do not fix a missing import or missing packaged stylesheet. A component-local style can be written as:
<style scoped>
.my-class {
color: blue;
}
</style>
- Import CSS in component:
import "./MyComponent.css"
- Check for CSS import errors, then inspect the emitted
style.css, packaged archive and stylesheet request in the installed app. A local development page can load CSS that was never included in the installed artifact.
Bundle too large
Problem: Build output is larger than expected
Solutions:
- Build using the toolkit configuration and inspect the emitted size report:
gxdev build
The current toolkit does not define an analyze mode that generates a bundle-analysis report. Running a bare Vite command can bypass the toolkit entry/configuration path. Configure a compatible analyzer through vite.extend.js if you need a detailed dependency breakdown.
-
Check for unused dependencies
-
Remove unused dependencies and reduce what the entry imports. The managed platform build disables code splitting because the platform loads
plugin.es.jsplusstyle.css. Dynamic imports are inlined into that entry, sodefineAsyncComponent(() => import(...))does not establish a separate downloadable production chunk or a smaller shipped archive. Verify the actual output before applying a generic Vite optimization. -
Keep Vue/Pinia externalized through the managed configuration. They are host-provided dependencies. A custom
vite.extend.jsoverride that bundles another runtime can change both size and behavior; compare the emitted artifact with the platform loader contract.
App Manifest Issues
Strings not updating from manifest
Symptoms:
gxp-stringelements show fallback values- Changes to manifest don't reflect
Solutions:
- Check JSON syntax:
node -e "JSON.parse(require('node:fs').readFileSync('app-manifest.json', 'utf8')); console.log('Manifest JSON is valid')"
- Verify key names match between manifest and template:
{
"strings": {
"default": {
"welcome_title": "Hello"
}
}
}
Merge this property into the existing manifest; do not replace its app identity/configuration. The key welcome_title must match the template's key exactly.
<!-- template -->
<h1 gxp-string="welcome_title">Fallback</h1>
<!-- ← same key -->
- Inspect
/app-manifest.jsonin the Network panel, confirm successful JSON parsing, then inspectmanifestErrorand the applied string value. The success log is:
[GxP Store] Loaded configuration from app-manifest.json
A missing manifest (404) uses defaults; other HTTP/parse errors populate manifestError. In both cases manifestLoaded becomes true, so that flag means the load attempt finished, not that authored strings were applied. The store loads asynchronously; an initial fallback can appear before the response arrives.
- Ensure file location - the local manifest must be in the project root and served at the expected root URL. A valid file in another folder does not satisfy that request.
Hot reload not working for manifest
Symptoms:
- Must refresh page for manifest changes
Solutions:
- Check Vite HMR is connected
- Look for errors in terminal
- Check whether a
gxp:manifest-updateorgxp:manifest-reloadevent reaches the store. The former applies the supplied object; the latter fetches the file again. If the relevant section is absent from an update, that section is not cleared byapplyManifest. Save the intended complete section and refresh/recreate the store when diagnosing stale values; changing one file is not proof the event arrived.
Store Issues
Store not reactive
Symptoms:
- UI doesn't update when store changes
- Computed properties don't recalculate
Solutions:
- Use store methods for updates:
// Correct
store.updateString("key", "value")
// Direct assignment can also be reactive on the Pinia store.
// Prefer the helper for a consistent update interface.
store.stringsList.key = "value"
updateString() changes the live store. It does not persist an edit to app-manifest.json or the platform's saved content. Save authored strings through the appropriate manifest/platform workflow and verify the next fresh load.
- Access via getters:
// Reactive
const title = computed(() => store.getString("title", "Default"))
// Not reactive if accessed once
const title = store.getString("title", "Default")
- Use toRefs for destructuring:
import { storeToRefs } from "pinia"
const { stringsList, pluginVars } = storeToRefs(store)
API calls failing
Symptoms:
- CORS errors
- 401 Unauthorized
- Network errors
Solutions:
- Check API environment:
# .env
API_ENV=mock # For local development
-
Verify the intended credential type and scope, not just whether an environment value is present.
API_KEYis defined asimport.meta.env.VITE_API_KEYfor browser code; it is not a server-only secret. Use a controlled test project and an appropriate test/page context, and keep privileged Project API/provider credentials out of this browser toolchain. -
Check the
/api-proxyrequest in the Network panel and the terminal’s upstream error. The toolkit mapsAPI_ENV,API_KEY, andAPI_PROJECT_IDto its browser environment values; editing onlyVITE_API_*fields does not override these explicit definitions. Restart the dev server after changing.env.
A local mock target also needs the relay’s mock API routes enabled. A production target needs valid project scoping, session/access requirements, declared dependency operation bindings, and granted permissions. Changing the environment name alone does not supply those requirements. See GxP Store.
Browser Extension Issues
Extension not loading
Solutions:
- Check extension path:
gxdev ext:install chrome
# Prints the extension directory/instructions and attempts to open browser settings
The helper does not complete browser approval. Load/enable the printed unpacked extension in the intended profile and inspect its browser-reported errors. A successful command alone does not prove it is active on the page.
- Enable Developer Mode in browser
- Check for manifest errors in browser console
- Reload extension after code changes
Element highlighting not working
Solutions:
- Verify the actual page origin and inspector state. Use the startup URL/port, confirm the intended extension/profile has access to that tab, and enable the inspector through its controls. Do not assume every launch uses localhost:3060.
- Inspect page and extension errors, then test a known inspectable component. A content-script load message alone does not prove highlighting or source mapping works; use Browser Extensions for the popup/inspector workflow.
- Reload extension:
- Chrome:
chrome://extensions→ Refresh - Firefox:
about:debugging→ Reload
- Chrome:
Vue components not detected
Solutions:
- Ensure Vue is in dev mode
- Check for Vue DevTools conflicts
- Refresh page after extension loads
Socket.IO Issues
Cannot connect to socket server
Error:
Error: Cannot connect to Socket.IO server
Solutions:
- Start socket server:
gxdev dev
# Socket service starts by default unless --no-socket is used
- Check port:
# Socket.IO/mock relay listener; independent of the Vite page port
SOCKET_IO_PORT=3069
- Verify the relay protocol separately - the relay selects HTTPS only when its expected certificate files exist. Vite HTTP mode does not force the relay to HTTP. See Socket Events for CLI/simulator fixed-origin and TLS limitations.
Events not received
Solutions:
- Check event name is exact (case-sensitive)
- Verify socket server is running (check TUI tabs)
- Check the named socket and exact event subscription; local channel metadata does not enforce room isolation
- Look for console errors
Event file not found
Error:
Event file not found: MyEvent.json
Solutions:
- Check file exists in
socket-events/ - Verify filename matches event name exactly
- Check JSON syntax
Common FAQs
How do I create a new project?
gxdev init my-plugin
cd my-plugin
gxdev dev --no-https=true # Explicit HTTP preview
Where is the final build output?
After running gxdev build:
dist/
├── build/ # Individual build files
│ ├── plugin.es.js
│ ├── style.css
│ └── ...
└── my-plugin.gxpapp # ← Deployable package
The .gxpapp file is a ZIP archive. Its filename follows the sanitized manifest name, with a package-name fallback, so it may differ from your directory name. Inspect the cleaned manifest, CSS, assets, and optional files before delivery; see Building for Platform.
How do I add a new translatable string?
- Add to manifest:
{
"strings": {
"default": {
"new_string_key": "Your text here"
}
}
}
- Use in template:
<span gxp-string="new_string_key">Default text</span>
The legacy datastore CLI writes src/stores/test-data.json, rather than app-manifest.json. It can help with legacy fixture data, but it does not persist the manifest string shown above:
gxdev datastore add --type string --key new_string_key --value "Your text"
How do I customize runtime files?
# Copy to your project for customization
gxdev publish server.cjs
gxdev publish gxpPortalConfigStore.js
# Extend Vite through the project file vite.extend.js
How do I test against a deployed API?
Use a controlled test project on the intended deployment and follow the GxP Store transport contract and API Integration. Record the target base URL, project path, page context and attendee/session requirements. Verify an allowed operation and an expected refusal before testing a wider audience.
Changing API_ENV does not authenticate an attendee, bind dependencies or grant permissions. The Vite config exposes API_KEY to browser code and the /api-proxy handler also uses it as the upstream Authorization header when set. The proxy is a development transport, not a secret vault or an authorization bypass. Do not paste a privileged production Project API key into that field or assume a browser request's bearer header is preserved over the configured proxy key. Keep server-to-server integration credentials in a separate server integration.
Restart the dev server after environment changes and inspect the actual target/status without logging credentials. Before packaging, verify the production artifact uses the intended host-provided runtime context rather than a development credential or test project value.
How do I scan for hardcoded strings?
gxdev datastore scan-strings --component src/Plugin.vue
This scans one component using template-text matching and prompts before adding candidate keys to src/stores/test-data.json. It does not rewrite the Vue template or update app-manifest.json. Review candidates and migrate selected strings to the manifest deliberately; use Browser Extensions for the separate source-writing extraction workflow.
How do I generate placeholder images?
# Single placeholder
gxdev assets generate --size 400x300 --name hero
# Five same-size placeholders
gxdev assets generate --size 200x200 --name avatar --count 5
Requires ImageMagick (magick or convert). Output goes to dev-assets/images/; the default format is PNG. The examples create hero.png and avatar-1.png through avatar-5.png. These are separate same-size placeholders, not responsive size variants. Reusing a name targets the same output paths, so choose a fresh name when keeping earlier files. This creates development placeholders, not proof that production assets are packaged or hosted correctly; verify the output URL and build workflow.
How do I access Dev Tools?
Press Ctrl+Shift+D (or Cmd+Shift+D on Mac) while on the dev server page.
Can I use TypeScript?
The Vue/Vite build can transpile TypeScript. That is separate from a successful type check; add and run an appropriate checker for the project rather than treating gxdev build as proof that all types pass. To author TypeScript:
- Rename files to
.tsor.vuewith<script lang="ts"> - Add tsconfig.json to your project
- Install TypeScript dev dependency
How do I deploy my plugin?
- Build and test your source with the toolkit.
- Commit the intended source and use the Developer Hub repository/build workflow.
- Inspect build verification, then publish the verified snapshot.
- Install that published release in the project and configure its permissions, dependencies, and portal/kiosk use.
Follow Building for Platform and Git Repositories and Builds for the current hosted workflow. A successful local archive alone does not establish an installed release.
Where do I report bugs?
File issues at: https://github.com/gramercytech/gx-devtools/issues
Debug Checklist
When something isn't working, check these in order:
- ✅ Console errors - Browser and terminal
- ✅ Network tab - Failed requests
- ✅ Manifest syntax - Valid JSON
- ✅ Key names - Exact match, case-sensitive
- ✅ Service status - Check TUI tabs
- ✅ Port conflicts - Single instance per port
- ✅ File paths - Correct aliases (@, @layouts, @gx-runtime)
- ✅ Cache - Restart first; clear only a diagnosed stale project cache
- ✅ Dependencies - npm install complete
- ✅ Node version - use the reviewed Node 24 toolchain, or verify every dependency engine (current Faker needs Node 22.13+ on the 22 line and npm 10+)
Getting Help
- Documentation: You're reading it!
- TUI Help:
/helpcommand - CLI Help:
gxdev --helpor ordinary command--help.gxdev execandgxdev testpass subsequent arguments, including--help/--ui, to the underlying tool instead of treating them as toolkit flags. - Issues: https://github.com/gramercytech/gx-devtools/issues