-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasecmd:run-scriptrelated to `npm run-script`related to `npm run-script`platform:windowsis Windows-specificis Windows-specific
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When case sensitivity is enabled, all scripts, e.g. npm run build, will fail with the error:
'module_name' is not recognized as an internal or external command
Where module_name is the name of the the module called by the script, e.g. webpack or cross-env
Expected Behavior
npm run should run scripts as normal, unaffected by the case sensitivity setting of the project folder (or its subfolders).
Steps To Reproduce
- Open a command prompt or PowerShell window at the location of your project folder
- Delete
node_modulesif it already exists - Make the project folder case sensitive using
fsutil.exe file setCaseSensitiveInfo . enable - Run
npm i - Try to run any script defined in your
package.jsonfile, e.g.npm run build - The script fails with an error similar to
'module_name' is not recognized as an internal or external command
As an alternative to steps 1-4, you could also recursively apply case sensitivity to the content of your project folder using this PowerShell command:
(Get-ChildItem -Recurse -Directory).FullName | ForEach-Object {fsutil.exe file setCaseSensitiveInfo $_ enable}
Environment
- OS: Windows 10 Pro (Microsoft Windows NT 10.0.19042.0 x64)
- Node: 14.17.0
- npm: 7.14.0
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 releasecmd:run-scriptrelated to `npm run-script`related to `npm run-script`platform:windowsis Windows-specificis Windows-specific