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

CoffeeScript causing trouble, not even being used v0.12.48 #1269

Closed camsjams closed 7 years ago

camsjams commented 7 years ago

Error:

./~/coffee-script/bin/coffee
Module parse failed: ----/node_modules/coffee-script/bin/coffee Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '#' (1:0)  
at Parser.pp$4.raise (----/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp$7.getTokenFromCode (----/node_modules/acorn/dist/acorn.js:2756:10)
    at Parser.pp$7.readToken (----/node_modules/acorn/dist/acorn.js:2477:17)
    at Parser.pp$7.nextToken (----/node_modules/acorn/dist/acorn.js:2468:15)
    at Parser.parse (----/node_modules/acorn/dist/acorn.js:515:10)
    at Object.parse (----/node_modules/acorn/dist/acorn.js:3098:39)
    at Parser.parse (----/node_modules/webpack/lib/Parser.js:902:15)
    at NormalModule.<anonymous> (----/node_modules/webpack/lib/NormalModule.js:104:16)
    at NormalModule.onModuleBuild (----/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
    at nextLoader (----/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
    at ----/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (----/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at ----/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:490:3)

 @ ./~/coffee-script/lib/coffee-script/register.js 52:13-48

Seems pretty strange and is preventing a gatsby develop command

And my package.json

{
  "name": "dot-io",
  "version": "1.0.0",
  "description": "Gatsby Jamstack static site",
  "scripts": {
    "build": "gatsby build",
    "build-prefix-links": "gatsby build --prefix-links",
    "develop": "NODE_ENV=development gatsby develop",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "config": "1.26.1",
    "gatsby": "0.12.48",
    "prop-types": "15.5.10",
    "react": "15.6.1",
    "react-helmet": "5.1.3"
  }
}
camsjams commented 7 years ago

Caused by using a folder for config

/config
    default.json
    development.json

instead of just config.json