Comments (4)
I think I've figured it out - I can replicate it by causing a yalc package directory to have a .DS_Store
file with a creation date more recent than any of the version directories.
Example replication steps (on a Mac):
yalc add
some package - it works- Delete the .DS_Store file in that package's directory of version directories
- Regenerate it (for example, Get Info, then tick and untick "Locked")
yalc add
the same package again - this time, it fails on trying tocd
into.DS_store
.
So it looks like the problem is, the function yalc add
uses to find the latest version is just taking all the contents of the directory, getting the most recent, and assuming it's a version directory. 99% of the time this works fine, but if for whatever reason some system file like .DS_Store
comes to be the most recent item in the directory, this crash happens.
Suggested fix: filter the array of directory contents to be only directories before finding the newest and cd
ing into it.
from yalc.
@AlanSl Did you find a workaround for this issue?
from yalc.
Not really. It might be possible to work around by forcing the version folders to have a more recent created date than .DS_Store
, e.g. by deleting the published versions then yalc publish
again?
from yalc.
Not really. It might be possible to work around by forcing the version folders to have a more recent created date than
.DS_Store
, e.g. by deleting the published versions thenyalc publish
again?
Yeah, it might work but it feels like it's going to be cumbersome and unstable...
Im wondering if there is a fork addressing this.
from yalc.
Related Issues (20)
- `yalc link` broken after adding/removing packages
- Is there a way to remove the published packages in the StoreMainDir ? HOT 2
- How to pass aditional args to npm update on pushing
- Is this project still active? HOT 13
- Dependencies not being installed when using `--link` HOT 1
- package version dependent? HOT 1
- yalc link across 2 monorepos not working HOT 2
- Resolve dependencies of a package with a specific value
- Import statements not resolving when using `yalc link`
- Importing `axios` is not executed crrectly
- Invalid "file:.yalc/<package name>" from the root project HOT 1
- Support push to remote and pull from local
- [Bug] I need to re-add the dependency every time it updates after I re-push it HOT 1
- Yalc add shows "Could not find package" HOT 1
- [BUG] yalc add does not include the same files as npm pack & publish HOT 1
- Allow specifying store-folder as an environment variable.
- How to render yalc add dynamically HOT 1
- How do you use `yalc` and `npm`/`yarn` in the same package?
- "yalc" is not recognized (Windows + Yarn) HOT 1
- It doesn't work..
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yalc.