Tell us what’s happening:
Describe your issue in detail here.
Even though my node app works according to the requirements, the JSON output depends on the secret variable in replit (equivalent to .env variable). Still the validator says " The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE" It’s impossible to get past this #Validator.
Your code so far
let express = require(‘express’);
let app = express();
I gives error even if i remove the code.
fcc-learn-node-with-express@0.1.0 start /home/runner/boilerplate-express
node server.js
/home/runner/boilerplate-express/myApp.js:1
let express = require(‘express’);
SyntaxError: Invalid or unexpected token
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
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 Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/runner/boilerplate-express/server.js:7:13)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fcc-learn-node-with-express@0.1.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fcc-learn-node-with-express@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-05-27T19_11_58_338Z-debug.log
exit status 1