Skip to content

fix: rename accountProtectionRuleSequence.js to lowercase for Linux compatibility#59

Open
gvamsi2010 wants to merge 1 commit intoakamai:masterfrom
gvamsi2010:fix/case-sensitive-filename-issue-58
Open

fix: rename accountProtectionRuleSequence.js to lowercase for Linux compatibility#59
gvamsi2010 wants to merge 1 commit intoakamai:masterfrom
gvamsi2010:fix/case-sensitive-filename-issue-58

Conversation

@gvamsi2010
Copy link
Copy Markdown

Summary

Fixes #58

Rename src/accountProtectionRuleSequence.js to src/accountprotectionrulesequence.js to match the all-lowercase convention used by every other file in src/.

Problem

On case-sensitive filesystems (Linux, Docker containers), Node.js cannot resolve the module because the require() path is all-lowercase but the actual filename is camelCase:

require('../../src/accountprotectionrulesequence')
→ looks for: src/accountprotectionrulesequence.js
→ actual:    src/accountProtectionRuleSequence.js   ← not found on Linux

This breaks two command files:

  • bin/commands/accountprotectionruleSequence.js
  • bin/commands/accountprotectionrulesequence.modify.js

Error:

Error: Cannot find module '../../src/accountprotectionrulesequence'

This works on macOS (case-insensitive filesystem) but fails on Linux (ext4/xfs).

Fix

A single file rename — no code changes. The file was the only one in src/ introduced with camelCase (v3.3.0, commit e6afe3e). All other ~75 files in src/ already use all-lowercase naming.

Note on PR #56

PR #56 takes the opposite approach (changing require paths to match the camelCase filename). That would still break because bin/commands/accountprotectionruleSequence.js itself has mixed casing — the Akamai CLI loads command files from bin/commands/ by scanning the directory, and the lowercase convention is what the rest of the codebase follows.

…ai#58)

On case-sensitive filesystems (Linux), Node.js cannot resolve the module
because the require path is all-lowercase but the filename is camelCase:

  require('../../src/accountprotectionrulesequence')
  → src/accountProtectionRuleSequence.js  (not found on Linux)

This affects two command files:
  - bin/commands/accountprotectionruleSequence.js
  - bin/commands/accountprotectionrulesequence.modify.js

Both require '../../src/accountprotectionrulesequence' (lowercase), so
renaming the source file to match fixes the issue.

All other files in src/ already follow the all-lowercase convention.
This was the only file introduced with camelCase (v3.3.0, commit e6afe3e).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Cannot find module '../../src/accountprotectionruleSequence due to file accountProtectionRuleSequence.js wrong case

1 participant