import { getRoles, getCompanies } from ‘./salaryData.js’;
I will get all three boxes again.
from the guide to the project, I am under the impression that I should see all three boxes again once I change the script line in index.html to;
however the missing first two boxes persists.
incase it matters my export statements in salaryData.js are;
I have narrowed it down to being something that happens after the import line as if I comment out the import line in main.js I get all three boxes again.
You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility
When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!
If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer!
If I remember correctly, main.js is located in a different directory than salaryData.js, which means that you use an incorrect import path.
Yes, you can still use the console.log. But it is the console for the whole Codecademy page, which means that some logs are irrelevant for your purpose. But it will show your console.logs.
I had this same issue and found help on another forum. I found the issue is not so much in the importing into the main.js, but actually the importing & file path in workAroundModule.js.
Initially I had the importing in workAroundModules.js as:
import { getDataByRole, getDataByCompany } from ‘./modules/salaryData.js’;
import salaryData from ‘./modules/salaryData.js’;