Reuse JavaScript Code Using import

Tell us what’s happening:
Anyone else getting this error?
“TypeError: unknown: s.extname is not a function”

Your code so far

import { uppercaseString, lowercaseString } from './string_functions.js';

// Only change code above this line

uppercaseString("hello");

lowercaseString("WORLD!");

import { uppercaseString, lowercaseString } from './string_functions.js';
// Only change code above this line

uppercaseString("hello");
lowercaseString("WORLD!");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0.

Challenge: Reuse JavaScript Code Using import

Link to the challenge:

It is literally the same code as in the answer.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

I would double check that your browser is up to date and that you have turned off any extensions that interfere with JS scripts for freeCodeCamp.

I am getting the same error.

Hmm, showing on mobile too.

I wonder if we changed something

I think it’s a bug. I was going to open an issue.

Edit: Issue:

1 Like

I have tried it on Chrome, Firefox, Opera, Internet Explorer and Brave. It is also giving me the same errors on the next 2 steps in this section.,

I am so glad that it’s not just me going absolutely bananas over here! The same happens with the next topic (import *)

Same error here, it’s annoying

I’m having the same issue. Not sure what’s causing this. I’ve even checked the solution to make sure I wasn’t crazy, but I have what FCC has verbatum

Thanks for the reports & patience everyone. We are working on a rollback.

Hey everyone we just pushed out a rollback for some recent changes. You should be able to submit the solutions normally now.

Sorry about the inconvenience.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.