question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document reserved words for folder names (importing)

See original GitHub issue

macOS 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
gaearoncommented, May 24, 2017

@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.

0reactions
stale[bot]commented, Dec 8, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found