Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start requires Admin privileges #11

Closed
dkundel opened this issue Oct 25, 2018 · 2 comments
Closed

npm start requires Admin privileges #11

dkundel opened this issue Oct 25, 2018 · 2 comments
Assignees
Labels
bug Something isn't working review needed Review Needed

Comments

@dkundel
Copy link
Member

dkundel commented Oct 25, 2018

As raised in #7, currently the symlinking process of placing index.html into the public/ folder requires Admin privileges on Windows.

This is not ideal. This file should not be modified and ideally be connected to the flex-plugin dependency. Since the current build script is based on react-scripts which enforces the presence of public/index.html, we need to have it present. An alternative solution is to force copy the file in on every npm start.

@dkundel dkundel added bug Something isn't working review needed Review Needed labels Oct 25, 2018
@dkundel dkundel self-assigned this Oct 25, 2018
@andreasonny83
Copy link
Contributor

According to this nodejs/node-v0.x-archive#8936, the symlinkSync doc is wrong as it's defining the parameters in the wrong order.

I didn't manage to test that on a Windows machine but my suggestion is to replace
fs.symlinkSync(indexHtmlSource, indexHtmlTarget);
with
fs.symlinkSync(indexHtmlTarget, indexHtmlSource);
in packages/react-app-rewire-flex-plugin/lib/index.js

@dkundel
Copy link
Member Author

dkundel commented Oct 25, 2018

Those seem to be old pre 1.0 docs of Node. It might actually be a legacy Node.js issue. @viperguynaz is running 8.12 which shouldn't have this issue: nodejs/node#18518

My guess is that npm creates the node_modules folder with some other permissions. I don't have a Windows machine around right now but I'll try to see if I can get someone to repro it for me.

dkundel added a commit that referenced this issue Oct 29, 2018
andreasonny83 pushed a commit to andreasonny83/flex-plugin-builder that referenced this issue May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working review needed Review Needed
Projects
None yet
Development

No branches or pull requests

2 participants