Hi Cyril,
Thanks for the response. Unfortunately, I cannot test these changes because I am now encountering a problem trying to run my c8y
application; this problem is concerning the c8y/style
and c8y/ngx-components
packages.
I have them listed in my list of dependencies in my root package.json
file and they appear under the @c8y
folder in node_modules
, but whenever I try to start the application in localhost mode I am getting an error that the CLI cannot find the package.json
files for each of the two previous modules.
Main error
Proxying requests to remote instance https://[domain].us.cumulocity.com
@c8y/style not found, no preview images included Error: Cannot find module '@c8y/style'
Require stack:
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\plugin.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\Application.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\index.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\ServerCommand.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\CumulocityCommandLine.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at config (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\plugin. at C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.js:43:41
at Array.reduce (<anonymous>)
at config (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.j
at Application.createWebpack (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webication.js:95:24)
at Application.createDevelopmentMiddleware (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8t\webpack\Application.js:59:14)
at DevServer.addMiddleware (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpaver.js:157:39)
at DevServer.startDevServer (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webprver.js:84:18)
at ServerCommand.action (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\Serv.js:47:23) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\config\\plugi
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\config\\index
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\Application.j
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\index.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli\\ServerCommand.js'
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli\\CumulocityCommand 'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\cli.js'
]
}
Failed to start local development server
Error: Cannot find module '@c8y/ngx-components/package.json'
Require stack:
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\utils\federationUtils.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\federation.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\plugin.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\Application.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\index.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\ServerCommand.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\CumulocityCommandLine.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli.js
- C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at resolveDependenciesFromNgxComponents (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\ctils\federationUtils.js:99:41)
at resolveDependencies (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\utils\fedils.js:92:39)
at getSharedDependencies (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\utils\fUtils.js:24:47)
at getModuleFederationExports (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\wefig\federation.js:21:62)
at config (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\plugin. at C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.js:43:41
at Array.reduce (<anonymous>)
at config (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpack\config\index.j
at Application.createWebpack (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webication.js:95:24)
at Application.createDevelopmentMiddleware (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8t\webpack\Application.js:59:14)
at DevServer.addMiddleware (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webpaver.js:157:39)
at DevServer.startDevServer (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\webprver.js:84:18)
at ServerCommand.action (C:\Users\lucas.liberman\AppData\Roaming\npm\node_modules\@c8y\cli\dist\cli\Serv 'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\config\\index.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\Application.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\webpack\\index.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli\\ServerCommand.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli\\CumulocityCommandLine.js', 'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\dist\\cli.js',
'C:\\Users\\lucas.liberman\\AppData\\Roaming\\npm\\node_modules\\@c8y\\cli\\cli.js'
]
}
Here they are listed as dependencies in my main package.json
:
"dependencies": {
"@angular/animations": "14.0.6",
"@angular/cdk": "14.1.2",
"@angular/common": "14.0.6",
"@angular/compiler": "14.0.6",
"@angular/core": "14.0.6",
"@angular/forms": "14.0.6",
"@angular/material": "^14.1.2",
"@angular/platform-browser": "14.0.6",
"@angular/platform-browser-dynamic": "14.0.6",
"@angular/router": "14.0.6",
"@angular/upgrade": "14.0.6",
"@c8y/client": "1018.0.211",
"@c8y/ngx-components": "^1018.0.211",
"@c8y/style": "^1018.0.211",
"@ngx-translate/core": "14.0.0",
"chart.js": "^2.9.4",
"jest": "^28.1.3",
"ng2-charts": "^2.4.2",
"ngx-bootstrap": "^9.0.0",
"rxjs": "^6.5.3",
"ts-node": "^10.9.1",
"zone.js": "~0.11.7"
},
The same dependencies are listed under node_modules
, which I checked to verify that they contain a package.json
folder.
In addition, I have already tried the following steps:
- re-installing
c8y/ngx-components
and c8y/style
using npm i
- Upgrading the c8y CLI from version 1016 to 1018
- Deleting and reinstalling
node_modules
- Retrying the last step but clearing the cache with
npm cache clean --force
Unfortunately, all of the above steps have resulted in the same error.