Topic: Error when following Tailwind + MDB GO tutorial
Shimada free asked 1 year ago
Expected behavior
I was following the tutorial at https://tailwind-elements.com/learn/te-foundations/basics/mdb-go-and-deploy/. The expected behavior of "npm install" after "mdb init tailwind-elements" is successfully installing dependencies.
Actual behavior
I ran "mdb init tailwind-elements" and successfully initialized a folder called "tailwind-elements". After "cd tailwind-elements" and "npm install", the following error showed up: "npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm ERR! code TAR_BAD_ARCHIVE
npm ERR! TAR_BAD_ARCHIVE: Unrecognized archive format"
Resources (screenshots, code snippets etc.)
Bartosz Cylwik staff answered 1 year ago
This looks like a node issue to me. You can try reinstalling node, for example the LTS version (18.17).
Does it only happen in this starter initialized with mdb init
? Did you try installing the package step by step? Here you can find tutorial for this:
https://tailwind-elements.com/docs/standard/getting-started/quick-start/#vite
Shimada free commented 1 year ago
Hi Bartosz, yes, it only happen in this starter initialized with mdb init. I managed to install Tailwind Elements using both the Vite and the CDN methods, but I still got the same error for the "MDB GO / CLI" method. I tried both Node 16 and Node 20 and the warnings and errors still appeared. I think there's something wrong with mdb init.
Bartosz Cylwik staff commented 1 year ago
Hi Shimada, we will monitor if more users have problems with mdb init
. We tested this command on several PCs but couldn't reproduce it.
Thank you for letting us know.
Bartosz Cylwik staff answered 1 year ago
Hi. I have tested the installation and I do not see any issues. What version of node are you using? Vite requires version 16+.
Sometimes, the npm cache can become corrupted, leading to installation issues. You can try verifying the npm cache.
npm cache verify
If updating node or verifying the cache do not help, you can also try cleaning the cache,.
npm cache clean --force
Best Regards!
Shimada free commented 1 year ago
I tried both "npm cache verify" and "npm cache clean --force" but the same error happened.
For command, "node -v", I got "v20.5.0".
For command "npm cache verify", I got the following messages:Cache verified and compressed (~\AppData\Local\npm-cache_cacache)Content verified: 1006 (73511607 bytes)Content garbage-collected: 2 (5079540 bytes)Index entries: 1006Finished in 2.914s
Then I tried "npm install" again, and the warning and errors are the following: " npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format npm ERR! code TAR_BAD_ARCHIVE npm ERR! TAR_BAD_ARCHIVE: Unrecognized archive format ".
For the first few seconds after running the command "npm install", hundreds of the same warning "npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding" were flashing in the terminal. Then it aborted, saying "npm ERR! code TAR_BAD_ARCHIVEnpm ERR! TAR_BAD_ARCHIVE: Unrecognized archive format".
For the command "npm cache clean --force", the terminal printed "npm WARN using --force Recommended protections disabled."
In the error log file, I found these messages at the end of the log:
10505 timing idealTree:node_modules/unset-value/node_modules/has-value/node_modules/isobject Completed in 0ms10506 timing idealTree:node_modules/unset-value/node_modules/isarray Completed in 0ms10507 timing idealTree:buildDeps Completed in 14069ms10508 timing idealTree:fixDepFlags Completed in 5ms10509 timing idealTree Completed in 14087ms10510 timing command:install Completed in 14095ms10511 verbose stack Error: TAR_BAD_ARCHIVE: Unrecognized archive format10511 verbose stack at Unpack.warn (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\warn-mixin.js:21:40)10511 verbose stack at Unpack.warn (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\unpack.js:229:18)10511 verbose stack at Unpack. (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:83:14)10511 verbose stack at Unpack.emit (node:events:526:35)10511 verbose stack at [emit] (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:303:12)10511 verbose stack at [maybeEnd] (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:426:17)10511 verbose stack at [consumeChunk] (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:458:21)10511 verbose stack at Unpack.write (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:385:25)10511 verbose stack at Unpack.end (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\tar\lib\parse.js:505:14)10511 verbose stack at Pipe.end (C:\Users\zixua\AppData\Roaming\nvm\v20.5.0\node_modules\npm\node_modules\minipass\index.js:84:34)10512 verbose cwd C:\Users\zixua\Desktop\tailwind css\test-mdb-tailwind-elements10513 verbose Windows_NT 10.0.2200010514 verbose node v20.5.010515 verbose npm v9.8.010516 error code TAR_BAD_ARCHIVE10517 error TAR_BAD_ARCHIVE: Unrecognized archive format10518 verbose exit 110519 timing npm Completed in 14582ms10520 verbose unfinished npm timer reify 169100544352110521 verbose unfinished npm timer reify:loadTrees 169100544352410522 verbose code 110523 error A complete log of this run can be found in: C:\Users\zixua\AppData\Local\npm-cache_logs\2023-08-02T19_44_03_032Z-debug-0.log
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 4.3.0
- Device: Lenovo computer
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes