build says it failed at imported module, but app is still built and works.
See original GitHub issueComplete noob in react, this is day 2 of my learning. but basically:
- i added
tiny-relative-date
to the app. - i import like
import relativeDate from 'tiny-relative-date';
- i run
npm run build
and then it says it failed, but the app still works in the browser.
output:
Garrett Morris@DESKTOP-U5VCBFV MINGW64 /e/blog
$ npm run build
> blog@0.1.0 build E:\blog
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/tiny-relative-date/src/factory.js:1
Read more here: http://bit.ly/2tRViJ9
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! blog@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blog@0.1.0 build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the blog package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs blog
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls blog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\blog\npm-debug.log
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Angular not importing a module in app.module.ts still gives ...
The error says, that app-bot-view-transfer-to-user is not registered in the corresponding auth-standalone module.
Read more >How to Fix ModuleNotFoundError and ImportError
Photo by Leone Venter on unsplash.com. tl;dr. Use absolute imports; Append your project's root directory to PYTHONPATH — In any environment ...
Read more >ModuleNotFoundError: no module named Python Error [Fixed]
For resolving an imported module, Python checks places like the inbuilt library, installed modules, and modules in the current project. If it's ...
Read more >Xcode 12.0.1 "No such module" | Apple Developer Forums
I have the same problem where I received the error "No module found" when ran on simulator, but works fine on mobile device....
Read more >Documentation - Module Resolution - TypeScript
Finally, if the compiler could not resolve the module, it will log an error. In this case, the error would be something like...
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
And herein lies the problem; this is the ES6 feature the bit.ly link mentions is not supported:
start
andbuild
are separate; try a different library! https://date-fns.org/v1.29.0/docs/distanceInWordsToNow(and read the link provided in the error for reasoning)