On-Premise: Usage Error: Workspace '@cloud-carbon-footprint/cli' not found

63 views
Skip to first unread message

Myriam Repple

unread,
Jan 2, 2024, 12:57:51 PMJan 2
to Cloud Carbon Footprint
Hello everyone, 

sorry for my "beginner´s question" first of all. 

I am trying to get the app running with the on premise csv template provided by the developers. I copied the file into the cli directory. When I run the following command in my console <yarn run estimate-on-premise-data -onPremiseInput [on_premise_data_input.test.csv]> , I get  a usage error:

Usage Error: Workspace '@cloud-carbon-footprint/cli' not found. Did you mean any of the following:
  - @cloud-carbon-footprint/api-template
  - @cloud-carbon-footprint/cli-template
  - @cloud-carbon-footprint/client-template
  - root-template?

$ yarn workspace <workspaceName> <commandName> ...

Can anyone help me? Running the app with <yarn start-with-mock-data> works.

Thank you!

Cloud Carbon Footprint

unread,
Jan 26, 2024, 1:02:01 PMJan 26
to Cloud Carbon Footprint
Hi Myriam,

Thanks for reaching out! It looks like you may have cloned the repository for your project and are trying to run the app templates within the main repository. I would suggest revisiting the Create an App | Cloud Carbon Footprint steps in our documentation and make sure you're running the listed npx command that will create the directory and project templates for you. From there, you can repeat the steps of copying your input file into the CLI package and then running the command from your directory command.

You're welcome to use CCF app with a cloned version of the repo, but just know your file will need to be in the CLI directory and you should be running the command from the very root directory of your project. There will be no need to interact with the templates.

Hope that helps!
The CCF Team at Thoughtworks

Myriam Repple

unread,
Feb 2, 2024, 9:29:20 AMFeb 2
to Cloud Carbon Footprint
Thanks for your reply. Actually, I never cloned the repository, instead I followed the steps on the "Create an App" site. Still the same result. When I copy the file into the CLI package and run the command from the project root directory, I get the usage error:

Usage Error: Workspace '@cloud-carbon-footprint/cli' not found. Did you mean any of the following:
  - @cloud-carbon-footprint/api-template
  - @cloud-carbon-footprint/cli-template
  - @cloud-carbon-footprint/client-template
  - root-template?

Cloud Carbon Footprint

unread,
Mar 28, 2024, 1:58:42 PMMar 28
to Cloud Carbon Footprint
Hi Myriam,

Looks like there is a bug here. In our root package.json, in the script that calls the lookup-table, we are missing the -template suffix for the cli package.

We can get a fix pushed up for this, but in the meantime, you could either add that yourself, our just navigate to the CLI directory and run the script from there. In either case, remember to have you input file located in the CLI directory.

Hope this helps!

Thanks,
The CCF Team at Thoughtworks

Reply all
Reply to author
Forward
0 new messages