My test fail Metric-Imperial Converter

hi, i can’t pass this 2 test

If the number is invalid, returned will be 'invalid number' .

If both the unit and number are invalid, returned will be 'invalid number and unit'

// running tests If the number is invalid, returned will be

'invalid number'

. If both the unit and number are invalid, returned will be

'invalid number and unit'

. // tests completed

Your project link(s)

solution: Glitch :・゚✧

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.64

Challenge: Metric-Imperial Converter

Link to the challenge:

1 Like

Hello there,

If I recall correctly, this project cannot be completed on Glitch right now, because Glitch does some special behind-the-scenes processing of the URLs. So, when the tests input this: https://typical-amber-macaroon.glitch.me/api/convert?input=1//2gal

Glitch converts it to this: https://typical-amber-macaroon.glitch.me/api/convert?input=1/2gal before sending it through your app server.

Easiest option is to migrate your app to another service.

Hope this helps

1 Like

Thank for your response

When I use Use our Replit starter project I received this

internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open ‘/home/runner/boilerplate-project-metricimpconverter-5/index.js’
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object. (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: ‘open’,
code: ‘ENOENT’,
path: ‘/home/runner/boilerplate-project-metricimpconverter-5/index.js’

That looks like the typical error Replit throws when it does not know which file to use as your main file. In this case, you need to configure the main file in your package.json as well as potentially set up a .replit file with whatever configuration you need to start your app.

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