nx
nx copied to clipboard
Error when using replaceFiles in Angular (@Analog) project
Current Behavior
When i use the new replaceFiles plugin inside the vite.config i get an error:
failed to load config from /Users/luiscastrocabrera/Projects/analog-test-replacement/test/vite.config.ts
> NX (0 , import_rollup_replace_files.default) is not a function
Expected Behavior
Files should be replaced properly.
GitHub Repo
https://github.com/luishcastroc/test-replacement.git
Steps to Reproduce
- clone the repo
- nx run test:serve:development
Nx Report
Node : 20.9.0
OS : darwin-arm64
pnpm : 8.14.0
nx : 17.2.8
@nx/js : 17.2.8
@nx/eslint : 17.2.8
@nx/workspace : 17.2.8
@nx/angular : 17.2.8
@nx/cypress : 17.2.8
@nx/devkit : 17.2.8
@nx/eslint-plugin : 17.2.8
@nx/vite : 17.2.8
typescript : 5.2.2
---------------------------------------
Community plugins:
@analogjs/content : 0.2.30
@analogjs/platform : 0.2.30
@analogjs/router : 0.2.30
@analogjs/vite-plugin-angular : 0.2.30
Failure Logs
[Nx Cloud] Did not identify a VCS platform.
> NX RunStart
{
"meta": {},
"branch": null,
"runGroup": "291093d22ecba7b8a0621a03377b7d2bfc3c21ec",
"ciExecutionId": null,
"ciExecutionEnv": "",
"hashes": [
"12810944270953227209"
],
"machineInfo": {
"machineId": "ZMeGvq+/RNro2mjJ6ZxHAQ==",
"platform": "darwin",
"version": "Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:51 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6030",
"cpuCores": 11
},
"vcsContext": null
}
RunStart duration: 45
failed to load config from /Users/luiscastrocabrera/Projects/analog-test-replacement/test/vite.config.ts
> NX (0 , import_rollup_replace_files.default) is not a function
TypeError: (0 , import_rollup_replace_files.default) is not a function
at /Users/luiscastrocabrera/Projects/analog-test-replacement/test/vite.config.ts:50:47
at loadConfigFromFile (file:///Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-52909643.js:66184:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async viteDevServerExecutor (/Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected]_type_ya3jc57gkjrhuy35peqe6cynkm/node_modules/@nx/vite/src/executors/dev-server/dev-server.impl.js:36:22)
at async getLastValueFromAsyncIterableIterator (/Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/utils/async-iterator.js:13:19)
at async iteratorToProcessStatusCode (/Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/command-line/run/run.js:41:29)
at async handleErrors (/Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/src/utils/params.js:9:16)
at async process.<anonymous> (/Users/luiscastrocabrera/Projects/analog-test-replacement/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]/node_modules/nx/bin/run-executor.js:59:28)
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Running target serve for project test failed
Failed tasks:
- test:serve:development
Hint: run the command with --verbose for more details.
View structured, searchable error logs at https://nx.app/runs/9OiJduWn8V
Package Manager Version
No response
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response