gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

Command line filepath name does not accept special characters for command "gatsby develop" #9234

Closed sbrookes4 closed 5 years ago

sbrookes4 commented 6 years ago

Description

Command line filepath name does not accept special characters for command "gatsby develop"

Steps to reproduce

  1. Open your CMD/ Git CMD
  2. Clone the repository to you local machine. You local machine should have a special character in the file path name - in my case it was C:\Users\Shawna's PC\hacktoberfest
  3. execute 'npm i'
  4. execute 'gatsby develop'
  5. it will go through the process of compiling but throws and error - after investigating, it has a carrot under the ' special character - it doesn't like it and wont compile

Expected result

Well, gatsby develop command should allow the thing to compile no matter what the file path's name is

Actual result

error:

WebpackError: ./.cache/api-runner-ssr.js

  1 | var plugins = [{
> 2 |       plugin: require('C:/Users/Shawna's Laptop/Desktop/hacktoberfest/hacktoberfest2018/node_modules/gatsby-plugin-styled-jsx/gatsby-ssr'),
    |                                        ^
  3 |       options: {"plugins":[]},

gatsbyerror_01 2gatsbyerror_01 gatsbyerror_03

it has a carrot under the ' special character - it doesn't like it and wont compile and throws some red lettering

command line

pieh commented 6 years ago

Seems like we need to escape paths when writing things out - at least here: https://github.com/gatsbyjs/gatsby/blob/9057427080128d6b78356efc799adcc4cda6c7da/packages/gatsby/src/bootstrap/index.js#L317-L322 and potentially in other places as well, maybe just siteDir would need to be escaped

gatsbot[bot] commented 5 years ago

Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open!

gatsbot[bot] commented 5 years ago

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!