Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubles with initial project setup #17

Open
cdubz opened this issue Jan 28, 2024 · 2 comments
Open

Troubles with initial project setup #17

cdubz opened this issue Jan 28, 2024 · 2 comments

Comments

@cdubz
Copy link
Contributor

cdubz commented Jan 28, 2024

This is follow up from redwoodjs/redwood/issues/9702 --

From @Tobbe:

there is inconsistency in the node versions between Studio and the fixture project

That's strange. They're both using the exact same version of Redwood, so I wonder why you'd get that. If you could provide some reproduction steps that'd be great 🙏

I started fresh a second time. The first thing I did was:

~ > nvm use
Found '/home/chris/WebstormProjects/studio/.nvmrc' with version <lts/*>
Now using node v20.11.0 (npm v10.2.4)
~ > yarn install
yarn install v1.22.5
[1/5] Validating package.json...
error @11.1.1: The engine "node" is incompatible with this module. Expected version "=18.x". Got "20.11.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

This happens because of the node engine setting in package.json:

studio/package.json

Lines 24 to 27 in af9588c

"engines": {
"node": "=18.x",
"yarn": ">=1.15"
},

After I remove that setting the yarn install command works.

Next, following the README I run:

~ > cd __fixtures__/test-project && touch yarn.lock && yarn
yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
error "./../../packaged.tgz": Tarball is not in network and can not be located in cache (["/home/chris/WebstormProjects/studio/packaged.tgz","/home/chris/.cache/yarn/v6/.tmp/9f801d5d45273e9bb70f92bce1a9899d/.yarn-tarball.tgz"])
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

This error comes from the resolution in the test project's package.json and I never quite figured out a way to satisfy it:

"resolutions": {
"@redwoodjs/studio": "./../../packaged.tgz"
},

This also sort of affects the packaging command (I tried to run to see if it would resolve the resolution issue):

~ > yarn studio:package
yarn run v1.22.5
$ node ./tasks/package.mjs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Studio: Package for Development

This script will build and package up studio.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✔ Matching RW versions!
✔ Project built successfully!
✔ Packaged directory cleared!
✔ API files copied!
✔ Web files copied!
✔ DB files copied!
✔ Misc files copied!
✔ Set dependencies!
✔ Archive created!
⠴ Running yarn...[1/5] Validating package.json...
[2/5] Resolving packages...
error "./../../packaged.tgz": Tarball is not in network and can not be located in cache (["/home/chris/WebstormProjects/studio/packaged.tgz","/home/chris/.cache/yarn/v6/.tmp/9f801d5d45273e9bb70f92bce1a9899d/.yarn-tarball.tgz"])
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I'm able to run RW_STUDIO_USER_PROJECT_PATH=./__fixtures__/test-project yarn rw dev fine and was able to test the changes I was working on well enough, I just couldn't do anything else inside the test project because of the above issues.

@Tobbe
Copy link
Member

Tobbe commented Jan 28, 2024

Thanks!

@Tobbe
Copy link
Member

Tobbe commented Jan 28, 2024

The engines field in the root package.json was wrong. With RW 7 canary versions it should be node 20. I fixed that in d15114e

Still need to work on making yarn rw dev easier to run. Thanks to your notes I now know what needs to be done 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants