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

[Bug]: yarn rw build does not work when the app is stored on a file path with a space character. #11464

Open
1 task
adendiamond opened this issue Sep 7, 2024 · 2 comments · May be fixed by #11692
Open
1 task
Labels
bug/needs-info More information is needed for reproduction topic/cli topic/windows

Comments

@adendiamond
Copy link

adendiamond commented Sep 7, 2024

What's not working?

Same as title. When I move my app to the root C:/, it builds fine.

How do we reproduce the bug?

Below is my terminal I/O for creating a RedwoodJs app and trying to build it with a space character in the file path:

C:\Users\adend\OneDrive - The University of Melbourne\a>yarn create redwood-app my-redwood-project
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
      - create-redwood-app
------------------------------------------------------------------
                🌲⚡️ Welcome to RedwoodJS! ⚡️🌲
------------------------------------------------------------------
✔ Compatibility checks passed
✔ Creating your Redwood app in my-redwood-project based on command line argument
√ Select your preferred language · TypeScript
√ Do you want to initialize a git repo? · no / Yes
✔ Project files created

Thanks for trying out Redwood!

 ⚡️ Get up and running fast with this Quick Start guide: https://redwoodjs.com/quick-start

Fire it up! 🚀

 > cd my-redwood-project
 > yarn install
 > yarn rw dev

Telemetry error
TT [OTLPExporterError]
    at IncomingMessage.<anonymous> (file:///C:/Users/adend/AppData/Local/Yarn/Data/global/node_modules/create-redwood-app/dist/create-redwood-app.js:147:72228)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  data: 'error code: 526',
  code: 526
}
Done in 9.91s.

C:\Users\adend\OneDrive - The University of Melbourne\a>cd my-redwood-project

C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project>yarn install
➤ YN0000: · Yarn 4.4.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 423ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 4s 869ms
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js@npm:3.38.0 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.23.0 must be built because it never has been before or the last one failed
➤ YN0007: │ msw@npm:1.3.3 [6af00] must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/client@npm:5.18.0 [02b51] must be built because it never has been before or the last one failed
➤ YN0007: │ @swc/core@npm:1.7.11 [2e6cb] must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.21.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.38.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/engines@npm:5.18.0 must be built because it never has been before or the last one failed
➤ YN0007: │ prisma@npm:5.18.0 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 3m 5s
➤ YN0000: · Done with warnings in 3m 10s

C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project>yarn rw build
✔ Generating Prisma Client...
✔ Verifying graphql schema...
✔ Building API...
✖ Command failed with exit code 1: node C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\@redwoodjs\vite\bins\rw-vite-build.mjs --webDir="C:\Users\adend\OneDrive - The        
University of Melbourne\a\my-redwood-project\web" --verbose=false
node:internal/modules/cjs/loader:1228
throw err;
^

Error: Cannot find module 'C:\Users\adend\OneDrive'
at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Module._load (node:internal/modules/cjs/loader:1051:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.17.0
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Error: Command failed with exit code 1: node C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\@redwoodjs\vite\bins\rw-vite-build.mjs --webDir="C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\web" --verbose=false
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'C:\Users\adend\OneDrive'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.17.0
    at makeError (C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\execa\index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _Task.task [as taskFn] (C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\@redwoodjs\cli\dist\commands\buildHandler.js:112:9)
    at async _Task.run (C:\Users\adend\OneDrive - The University of Melbourne\a\my-redwood-project\node_modules\listr2\dist\index.cjs:2049:11)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Need help?
 - Not sure about something or need advice? Reach out on our Forum (​https://community.redwoodjs.com/​)
 - Think you've found a bug? Open an issue on our GitHub (​https://github.com/redwoodjs/redwood​)
 - Here's your unique error reference to quote: 'e310bb32-cc4d-410d-b2aa-9bc0d9b8512f'
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

And here is the I/O for yarn rw build, building the same app from C:/:

C:\my-redwood-project>yarn rw build
✔ Generating Prisma Client...
✔ Verifying graphql schema...
✔ Building API...
✔ Building Web...

Creating 200.html...
Starting prerendering...
You have not marked any routes to "prerender" in your Routes (​file://C:\my-redwood-project\web\src\Routes.tsx​).

What's your environment? (If it applies)

System:
    OS: Windows 10 10.0.19045
  Binaries:
    Node: 20.17.0 - ~\AppData\Local\Temp\xfs-1cc9b24b\node.CMD
    Yarn: 4.4.0 - ~\AppData\Local\Temp\xfs-1cc9b24b\yarn.CMD  
  Databases:
    SQLite: 3.44.2 - C:\msys64\ucrt64\bin\sqlite3.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
  npmPackages:
    @redwoodjs/auth-dbauth-setup: 8.0.0 => 8.0.0
    @redwoodjs/core: 8.0.0 => 8.0.0
    @redwoodjs/project-config: 8.0.0 => 8.0.0
  redwood.toml:
    [web]
      title = "Redwood App"
      port = 8910
      apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
      includeEnvironmentVariables = [
        # Add any ENV vars that should be available to the web side to this array
        # See https://redwoodjs.com/docs/environment-variables#web
      ]
    [api]
      port = 8911
    [browser]
      open = false
    [notifications]
      versionUpdates = ["latest"]

Are you interested in working on this?

  • I'm interested in working on this
@adendiamond adendiamond added the bug/needs-info More information is needed for reproduction label Sep 7, 2024
@standuprey
Copy link
Contributor

standuprey commented Sep 7, 2024

I got the same error message (telemetry error) with the same node version (but mac), except build worked

➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 394ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 426ms

------------------------------------------------------------------
                🌲⚡️ Welcome to RedwoodJS! ⚡️🌲
------------------------------------------------------------------
✔ Compatibility checks passed
✔ Creating your Redwood app in qetting based on command line argument
✔ Select your preferred language · TypeScript
✔ Do you want to initialize a git repo? · no / Yes
✔ Enter a commit message · Initial commit
✔ Do you want to run yarn install? · no / Yes
✔ Project files created
✔ Installed node modules
✔ Generated types
✔ Initialized a git repo with commit message "Initial commit"

Thanks for trying out Redwood!

 ⚡️ Get up and running fast with this Quick Start guide: https://redwoodjs.com/quick-start

Fire it up! 🚀

 > cd qetting
 > yarn rw dev

Telemetry error
TT [OTLPExporterError]
    at IncomingMessage.<anonymous> (file:///Users/stan/.yarn/berry/cache/create-redwood-app-npm-8.0.0-263acec24b-8.zip/node_modules/create-redwood-app/dist/create-redwood-app.js:147:72228)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  data: 'error code: 526',
  code: 526
}
➜  Code cd qetting
➜  qetting git:(master) yarn install
➤ YN0000: · Yarn 4.4.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 385ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 243ms
➤ YN0000: · Done with warnings in 0s 900ms
➜  qetting git:(master) rw info

  System:
    OS: macOS 14.3.1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - /private/var/folders/g7/0v2mwcd50dv822c6142lth1h0000gp/T/xfs-d839381d/node
    Yarn: 4.4.0 - /private/var/folders/g7/0v2mwcd50dv822c6142lth1h0000gp/T/xfs-d839381d/yarn
  Databases:
    SQLite: 3.43.2 - /usr/bin/sqlite3
  Browsers:
    Chrome: 128.0.6613.120
    Safari: 17.3.1
  npmPackages:
    @redwoodjs/core: 8.0.0 => 8.0.0
    @redwoodjs/project-config: 8.0.0 => 8.0.0
  redwood.toml:
    [web]
      title = "Redwood App"
      port = 8910
      apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
      includeEnvironmentVariables = [
        # Add any ENV vars that should be available to the web side to this array
        # See https://redwoodjs.com/docs/environment-variables#web
      ]
    [api]
      port = 8911
    [browser]
      open = true
    [notifications]
      versionUpdates = ["latest"]
➜  qetting git:(master) yarn rw build
✔ Generating Prisma Client...
✔ Verifying graphql schema...
✔ Building API...
✔ Building Web...

Creating 200.html...
Starting prerendering...
You have not marked any routes to "prerender" in your Routes.

@Tobbe
Copy link
Member

Tobbe commented Sep 10, 2024

Thanks for the issue report @adendiamond and @standuprey

I think there are two separate things going on here.

  1. The path with spaces bug
  2. The telemetry issue

We're aware of the telemetry issue and @Josh-Walker-GM is in charge of sorting that out. We just wanted to focus on getting RW v8 out first 🙂

I'll ask @callingmedic911 to take a look at the path issue

@callingmedic911 callingmedic911 linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/needs-info More information is needed for reproduction topic/cli topic/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants