You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using noir in one of the projects and even though it was a express project noir couldn't identify and ended with the below error
⚑ Detecting technologies to base directory.
▲ No technologies detected.
➔ If you know the technology, use the -t flag to specify it.
➔ Please check tech lists using the --list-techs flag.
Checked the detection logic and it is quite straightforward - it returns true if BOTH conditions are met:
The file has a .js extension (filename.includes? ".js")
AND one of these patterns is found in the file contents:
require('express') (single quotes)
require("express") (double quotes)
Checked the project code and it never had require syntax in it instead it had import syntax (import express from 'express';)
Just added var router = require('express').Router() line in one of the js file present in the repo and noir was able to detect and worked like a charm
I think that the current Express.js detector could be enhanced. Here are some suggestions:
Current Limitations:
Only checks for basic require('express') pattern
Might miss modern JavaScript code patterns
Suggested Improvements:
Add detection for more patterns like:
import express from 'express'
const/let/var express = require('express')
import { Router } from 'express'
Support more file types:
TypeScript (.ts files)
Modern JavaScript modules (.mjs files)
Check package.json for express dependency
This would help catch more Express.js applications and reduce false negatives.
I don't have coding experience to implement this, but I hope this suggestion helps improve the tool!
The text was updated successfully, but these errors were encountered:
Hi Team,
I was using noir in one of the projects and even though it was a express project noir couldn't identify and ended with the below error
Checked the detection logic and it is quite straightforward - it returns true if BOTH conditions are met:
Checked the project code and it never had require syntax in it instead it had import syntax (import express from 'express';)
Just added var router = require('express').Router() line in one of the js file present in the repo and noir was able to detect and worked like a charm
I think that the current Express.js detector could be enhanced. Here are some suggestions:
Current Limitations:
Suggested Improvements:
Add detection for more patterns like:
Support more file types:
Check package.json for express dependency
This would help catch more Express.js applications and reduce false negatives.
I don't have coding experience to implement this, but I hope this suggestion helps improve the tool!
The text was updated successfully, but these errors were encountered: