Document reserved words for folder names (importing)
See original GitHub issuemacOS Sierra, React-Scripts 1.0.5, NODE_PATH=src
in .env file
I’ve been keeping my String constants in src/constants
and exporting them all using an index (mainly Redux actions). I just tried:
import {DATA_SUCCESS, DATA_REQUEST, DATA_FAILURE } from 'constants'
but they came through as undefined
. Realising the index wasn’t being imported correctly, I then changed the name of the folder and it worked like the 0.9.x days. Could we please have a list of all the reserved words?
Repo to demonstrate issue is here: https://github.com/will-stone/cra-reserved-folder-names Check console for both positive and negative tests, called from app.js
Changing the folder name to all caps allows this to work too. I think I’ll stick with this as a solution.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Import method in folder with reserved word - python
The only answer is to change the name of your file. You can't have a module with the same name as a reserved...
Read more >Windows reserved file names - HelpNDoc
Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6,...
Read more >Naming Files, Paths, and Namespaces - Win32 apps
Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5,...
Read more >ECMS - Microsoft Operating System Reserved Characters ...
This document explains reserved characters/names in Microsoft operating systems, relevant to Import Agent processes.
Read more >File and directory name restrictions on Windows
The New Technology File System (NTFS) in Windows has naming conventions for a file: a base file name and an optional extension, separated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@will-stone They are supported and this issue is still open. Just saying this is a good example of why relying on them is fragile.
@YoginAlex Please provide a project reproducing the issue. There is too little information to help you. The fact that it worked in 0.9.x does not mean anything: it used Babel ES6 modules CommonJS interop which does not conform to the spec and has many edge cases.
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.