print console in adobe mesh api | Community
Skip to main content
HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 2, 2024
Solved

print console in adobe mesh api

  • April 2, 2024
  • 2 replies
  • 951 views

Hi,

I am using adobe mesh api &  created mesh.json. I am running on my local. I want to console/debug the value passing from parent to child and for that i have added console.log in ./additional-resolvers.js. getting below error on run:

Error: LintError in File ./additional-resolvers.js: Unexpected console statement. , 'console' is not defined.

Hence use below lines to disable eslint

1)

// eslint-disable-next-line no-console
const resolvers = {}

2) Created eslintrc.js at project root dir with

module.exports = {
// other configurations...
rules: {
'no-console': 'off', // Allow console statements
},
};

3) eslint-disable-next-line no-console on console log statement

4) console.log('phrase value', phrase);// eslint-disable-line

 

But no luck...

Anybody can help me here?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by HeenaMadan

Hi @arunpatidar 

 

Discussed with Adobe team and As per them, console is not supported in adobe mesh hence it will not work.

We can debug it only. So we can closed this ticket

2 replies

abhishekanand_
Community Advisor
Community Advisor
April 3, 2024

Hi @heenamadan,

  1. Double-check your ESLint configuration and make sure it's being applied to your project. You can check this by running the command ./node_modules/.bin/eslint --print-config ./additional-resolvers.js and verifying that the .eslintrc.js file is included in the output.
  2. If the configuration is not being applied, you might need to adjust your package.json or .eslintrc.js to include the correct configuration path.
    Here's an example of how to do this in your package.json:

 

{ "eslintConfig": { "root": true, "extends": ["./.eslintrc.js"] } }​

Hope this helps!

 

Abhishek Anand
HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 11, 2024

Hi,

 

Discussed with Adobe team and as per them, console is not supported in adobe mesh hence it will not work.

We can debug it only. So we can closed this ticket

arunpatidar
Community Advisor
Community Advisor
April 8, 2024

Hi @heenamadan 

Were the user suggestions helpful? Let us know if more details are needed or mark the answer as correct. If you found a solution independently, please share it with the community.

Arun Patidar
HeenaMadan
Community Advisor and Adobe Champion
HeenaMadanCommunity Advisor and Adobe ChampionAuthorAccepted solution
Community Advisor and Adobe Champion
April 11, 2024

Hi @arunpatidar 

 

Discussed with Adobe team and As per them, console is not supported in adobe mesh hence it will not work.

We can debug it only. So we can closed this ticket