-
-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
JS files in symlink directory under src -- are not importable #4295
Comments
I was not able to find a solution to the above problem. The webpack configuration of create-react-app is in
the use of I changed the above to
And this works (obviously temporarily, till next module upgrade...).. Clearly, this is a bug, so I am keeping the issue open with the hope that it will get addressed (or at least users of the create-react-app will be able to override behavior for this). |
This is a dup of #3547, maybe add your comments there? |
Is this a bug report?
Yes this is a bug.
JS files under a symlinked directory within ./src are not compiled.
If the directory is not sym-linked -- and instead, a regular directory, -- no problems.
Ability to do this often needed when developer wants to share a library across multiple react/react-native projects.
Also I believe this issue is directly related (or a duplicate) of
#3547
It is not clear how 3547 was solved, and there are no user documentation/guide changes that address the problem.
Another similar issue form about 9 months ago:
#2553
Did you try recovering your dependencies?
Not applicable
Which terms did you search for in User Guide?
symlinks, Windows symlinks , module parse failed unexpected token
Environment
node -v
: v9.8.0npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.5.1npm ls react-scripts
(if you haven’t ejected):ua1b@0.1.0 `-- UNMET DEPENDENCY react-scripts@1.1.4
npm ERR! missing: react-scripts@1.1.4, required by ua1b@0.1.0
(I have not ejected, and app was created by create-react-app )
Then, specify:
Steps to Reproduce
For example, my test file (I use react-native-web) is:
import the component in your App.js
import {VTestComponent} from './js.app/VTestComponent';
run: npm start
You will get an error
it should have compiled. There is no mention in the user documentation that it would not work
(the symlinked directory is under the ./src directory).
Also not clear what configurations to package.json or something else needs to be made -- for this to work.
my package.json (produced by create-react app, plus my own additive changes) is below:
(it also includes, of course react-scripts)
thank you.
The text was updated successfully, but these errors were encountered: