"npm run collect" works wrong
See original GitHub issueMacOS, node v11.2, npm v 6.5, python 3.6
I have this porject on Window and Mac, it’s ok on Windows, but not on Mac, when I run npm run collect
it does it job but nothing changes. I tried to find out the issue and saw that in build folder files have different name than in tutorial, e.g this “runtime” prefix
> reactify-ui@0.1.0 build-rename-js /Users/menschikov/projects/reactifydjango/src/reactify-ui
> renamer --regex --find 'main\.[^\.]+\.js' --replace 'reactify-django.ui.js' build/static/js/*.js
✔︎ build/static/js/runtime~main.229c360f.js -> build/static/js/runtime~reactify-django.ui.js
here’s what I have in Build
seems it can’t find necessary files accordingly to regex and rename them
Also I compared each of these 3 generated js files with reactify-django.ui.js from python static files (originally cloned) and they are totally differenet, I did no changes, just run “npm run collect”.
If I run "npm run start"everything work on react-only server
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
"npm-run-all" Is Not Recognized As an Internal or External ...
Try closing the current terminal session. Reopen a new session. Try the command again ( will pick up the new path settings with...
Read more >Error by npm run deploy_contract - Ethereum Stack Exchange
I am getting a catch error ( catch ERROR: ERROR STATUS: 403) when I ran "npm run deploy_contract". 10k-collection-video@2.0.0 ...
Read more >Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >Top 10 Most Common Node.js Developer Mistakes - Toptal
When i trying to do npm run dev for second service, getting following error : Failed to load service '/home/thrymr/Desktop/paylief-backend/payroll_engine/src/ ...
Read more >15 Common Error Codes in Node.js and How to Fix Them
15. EPERM · Close all instances of your editor before rerunning the command (maybe some files were locked by the editor). · Clean...
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
I had an issue with “npm run collect” not renaming and copying the files. I fixed this by replacing the single ’ with double " inside the package.json renamer and build commands. " is used instead of ’ on windows. My package.json now looks like this:
@menschikov - SOLUTION if you have to update react-scripts to > 2.0: change the “scripts” in package.json to the below (just replace all the mob.ui with whatever you’re using)
and
to your css.html file in templates folder
— you can name these files whatever you want I just kept them consistent with what
npm run build
generatesMaybe not the best solution but it works for me (not exactly sure what the difference between the
1.*.chunk.js
,main.*.chunk.js
, andruntime~main*.js
files are)