Redwood: [macOS] `yarn rw dev` crashes when there is a space in the home path

Created on 11 Mar 2020  Â·  2Comments  Â·  Source: redwoodjs/redwood

I tried using an absolute path to a symlinked home without a space when creating the project but it crashes on rw dev nonetheless.

You can see from the errors where the issue is:

❯ yarn rw dev
yarn run v1.22.4
$ '/Users/frederick 1/dev/redwoodblog/node_modules/.bin/rw' dev
  âś” Generating the Prisma client...
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:43:09 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js exited with code 1
10:43:09  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
10:43:09 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server exited with code 1
10:43:09 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js restarted
10:43:09  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch restarted
10:43:09 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server restarted
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:43:10 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js exited with code 1
10:43:10 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js restarted
10:43:10  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
10:43:10 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server exited with code 1
10:43:10  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch restarted
10:43:10 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server restarted
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:43:10 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js exited with code 1
10:43:10 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js restarted
10:43:10  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
10:43:10  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch restarted
10:43:10 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server exited with code 1
10:43:10 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server restarted
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:43:10  db | cd /Users/frederick 1/dev/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
error Couldn't find a package.json file in "/Users/frederick"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:43:10 web | cd /Users/frederick 1/dev/redwoodblog/web && yarn webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js exited with code 1
10:43:10 api | cd /Users/frederick 1/dev/redwoodblog/api && yarn dev-server exited with code 1
undefined
✨  Done in 10.93s.
kinbug

Most helpful comment

Hmm, I don’t think that’s yarn. More likely to do with how we’re handling path in the command itself. We’ll take a look.

Thanks for reporting this and sorry you had the trouble.

All 2 comments

This might be an issue with yarn itself: https://github.com/yarnpkg/yarn/issues/7839.

Although I've been using yarn forever and it hasn't been an issue.

Hmm, I don’t think that’s yarn. More likely to do with how we’re handling path in the command itself. We’ll take a look.

Thanks for reporting this and sorry you had the trouble.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

balaji-balu picture balaji-balu  Â·  3Comments

slavakurilyak picture slavakurilyak  Â·  4Comments

thedavidprice picture thedavidprice  Â·  3Comments

peterp picture peterp  Â·  4Comments

jtoar picture jtoar  Â·  4Comments