Comments (8)
@terenceodonoghue btw: one mistake I had was not awaiting these methods as they now return promises, which is why the conflict resolver was triggered.
This is still a problem for running yo on existing filesystems, but for completely new projects properly awaiting their return values should avoid this issue.
from generator.
Running into this with yeoman-generator@^5.3.0
. Can confirm that the trailing comma seems to be triggering the conflict resolver.
from generator.
@ntucker that fixed it, thanks! I replaced:
writing() {
this.addDependencies([...])
}
with:
async writing() {
await this.addDependencies([...])
}
Off-topic, but it's now failing for another reason: addDependencies
and addDevDependencies
attempt to resolve all packages against the public npm registry and ignores those I've defined in my .npmrc
, thus the generator fails with a 404 error.
from generator.
Closing, since it's resolved. The private repo problem is unrelated and should be discussed in the other issue.
from generator.
@mshima "This is still a problem for running yo on existing filesystems, but for completely new projects properly awaiting their return values should avoid this issue."
This conflict issue will appear if you have an existing package.json - which is often the case when you're using yo to add pieces to an existing project instead of just create a new one. (I assume this is the point of making yorc files)
from generator.
If you want to force package.json to be written, you can do something like #1239.
Or write a .yo-resolve file with
package.json force
from generator.
Why is there a merging policy if the expectation is to only write to existing files if it's completely forced?
from generator.
What are you spectating here?
To merge? To don’t generate at all? To use existing values?
The default is to merge, which is the better default for composing.
If you want to keep old values as default, you should load them.
this.addDependencies({
…dependencies,
…this.packageJson.getAll().dependencies
})
from generator.
Related Issues (20)
- No package manager install will be executed HOT 1
- User Defined Options ignored in composeWith HOT 1
- this.registerTransformStream is not a function HOT 2
- Minimist CVE HOT 1
- "Which type of client-side component to create?" is missing "Extension" HOT 1
- Introduce a flag to use config in proxymode HOT 1
- Is this project abandoned? HOT 1
- Dependent library tui-jsdoc-template has high severity vulnerabilities HOT 1
- Value from option defined in a composed generator is only available on generator triggered HOT 2
- "Invoke validation failed. User forbidden to perform action" when trigger "More details" button of message extension sample HOT 2
- Cannot Remove Default Add-In HOT 2
- [deps] Check for breaking changes in Dependabot's PRs HOT 1
- Can't install 6.0.1 using npm HOT 5
- Improve readability of fs.test.ts; correct TS problems in it.
- Migrate tests to vitest and add node 20 to ci
- Replace jsdoc with typescript based documentation generator
- Dependency Conflict on `mem-fs` for yeoman-generator 7.x HOT 10
- yeoman-generator should declare an ordinary dependency on 'mem-fs' HOT 3
- Documentation is out of date HOT 3
- yeoman-generator wants conflicting transitive dependencies on mem-fs HOT 3
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 generator.