Open JulioJu opened 3 years ago
I'm not totally sure what the issue is here, but I'm investigating.
@phillysnow
I believe the problem is that yarn resolves dependencies in an other way than npm.
There is no yarn.lock
in this folder. Therefore when we run yarn install
, yarn download other dependencies than those defined into package-lock.json.
What do you think about this hypothesis ?
@phillysnow I've tested
rm -rf node_modules
npm install
yarn dev
=> works fine
rm -rf node_modules
yarn install
yarn dev
=> error
I believe the problem is not with yarn
, but with the fact than dependencies installed by yarn
are not the same than those installed by npm
with its package-lock.json.
I've tried yarn import
without success. But they say than yarn import
is not a perfect command to migrate from package-lock.json to yarn.lock. See also https://classic.yarnpkg.com/blog/2018/06/04/yarn-import-package-lock/ .
I guess it's an important issue. I've lost a lost of time with this problem. Furthermore, yarn
is the default package manager proposed by prismic-cli
v4. It's problematic I guess.
Maybe prismic-cli
should detect if the theme contains a yarn.lock
or package-lock.json
and trigger installation with the correct package manager and not give the choice. What do you think about that ?
I honestly have no idea what's happening here, it's clear there's a difference with the dependencies yarn is installing, but it's not related to the package-lock.json file as it persists without this.
I'm going to have to call in support from smarter people to help me on this one.
@lihbr any ideas?
@phillysnow thanks for your answer.
If you delete package-lock.json
, there is no effect on yarn
as it does not uses it when yarn install
calculates dependencies to install.
So this is an issue with Nuxt it seems: https://github.com/nuxt/nuxt.js/issues/9205
I'm testing workarounds.
@phillysnow
With v4, during initalization, when we choose
yarn
as package manager, current repository is borken.How to reproduce
Instantiate project and select yarn
run the app
We have error