Expand my Community achievements bar.

SOLVED

Content Fragment Editor Extension: Not able to deploy to Runtime workspace

Avatar

Level 9

Hello Team,

 

For testing purpose, I have downloaded this project.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/developing/extensi...

Ran the command: npm install to install the dependencies.

Ran the command: aio app use to generate the .env file

Checked the generated .enf file, this is fine

Now, when I ran the command: aio app deploy  getting below mentioned error

 

deploy.png

 

Initially i thought, I dont have access to this workspace. Then, I deployed other Adobe IO runtime project to this workspace. Able to deploy.

 

Not sure, what I am missing here.

 

cc @daniel-strmecki  @sarav_prakash  @AmitVishwakarma 

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Mahesh_Gunaje , for local testing, adding query param is the way to test. As replied in another question by you. 

 

Now your above error can happen due to parcel cache as well. This is how I solve. I created a `.scripts/clean.sh` with below code

#!/bin/bash

# Delete all node_modules folders in the parent and child packages
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
rm -rf .parcel-cache

# Delete all dist folders in the parent and child packages
find . -name "dist" -type d -prune -exec rm -rf '{}' +

# Clear npm cache
npm cache clean --force

# Reinstall pnpm
npm install -g pnpm
npm install -g @adobe/aio-cli

# Install dependencies using pnpm
pnpm install

echo "Cleanup and reinstallation complete."

And under package.json scripts, added new script

"clean": "sh ./.scripts/cleanup.sh"

 

Point is apart from deleting node_modules, you must delete parcel-cache, dist folders and reinstall latest aio plugins.

 

Another tip I follow, dont just run `aio app deploy`. Instead add `aio app deploy --force-build --force-deploy`. Many time parcels decides to exclude build / deploys even when we expect to happen. So I usually force the deployments. 

View solution in original post

3 Replies

Avatar

Level 9

Hi Team,

 

Looks like the issue is related to timeout error.

I have deleted node_modules, dist folder. Ran the command: npm install again

aio app build  then ran aio app deploy

Able to deploy to Adobe IO runtime. Now, I am able to test the feature using this URL 

https://experience.adobe.com/?devMode=true&ext=https://123456-sample-qa.adobeio-static.net&repo=author-p123456-e66666.adobeaemcloud.com#/@xyz/aem/cf/editor/ ... so on

 

Is this the right way to test the Extension? Or else, I need to map this extension somewhere?  

 

New to Extension manager.  So, please help me.

cc @daniel-strmecki @sarav_prakash  @AmitVishwakarma 

Thanks

 

Avatar

Correct answer by
Community Advisor

Hi @Mahesh_Gunaje , for local testing, adding query param is the way to test. As replied in another question by you. 

 

Now your above error can happen due to parcel cache as well. This is how I solve. I created a `.scripts/clean.sh` with below code

#!/bin/bash

# Delete all node_modules folders in the parent and child packages
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
rm -rf .parcel-cache

# Delete all dist folders in the parent and child packages
find . -name "dist" -type d -prune -exec rm -rf '{}' +

# Clear npm cache
npm cache clean --force

# Reinstall pnpm
npm install -g pnpm
npm install -g @adobe/aio-cli

# Install dependencies using pnpm
pnpm install

echo "Cleanup and reinstallation complete."

And under package.json scripts, added new script

"clean": "sh ./.scripts/cleanup.sh"

 

Point is apart from deleting node_modules, you must delete parcel-cache, dist folders and reinstall latest aio plugins.

 

Another tip I follow, dont just run `aio app deploy`. Instead add `aio app deploy --force-build --force-deploy`. Many time parcels decides to exclude build / deploys even when we expect to happen. So I usually force the deployments. 

Avatar

Level 9

Thanks a lot @sarav_prakash   for your help.

Last time, I have manually deleted these folders.

I have deleted node_modules, dist folder. (I think deleted .parcel-cache folder too).  Ran the command: npm install again

aio app build  then ran aio app deploy.  Will follow your solution .

Will trouble you at least for a week with few queries related to Extension manager. 

 

Thanks a lot