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

Errors on windows when running cameronjs dev #8

Open
jacebenson opened this issue Sep 7, 2021 · 2 comments
Open

Errors on windows when running cameronjs dev #8

jacebenson opened this issue Sep 7, 2021 · 2 comments

Comments

@jacebenson
Copy link

Hey I was trying out cameronjs on my windwos machine and I followed the steps listed there to get started.

jaceb@home MINGW64 ~/git
$ yarn global add cameronjs
[1/4] Resolving packages...
[2/4] Fetching packages...
(contined till done)

Great installed.

jaceb@home MINGW64 ~/git
$ cameronjs new ./camerontest
CameronJS v0.5.7 ready! Let's build your app.

-------------------------------------------
|  Creating directory structure
-------------------------------------------
(continued a bunch of outputs)
Let's start a web server and get to work:

←[34m  cd ./camerontest←[0m
←[34m  cameronjs dev
←[0m
The page that opens in your browser will help
you get started. Happy coding!

Great, looks like I should be running soon.

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs dev
Try `cameronjs --help` for usage options

Well that's not running... lets look at help

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs --help
Try `cameronjs --help` for usage options
Usage cli.js <command> [options]

Commands:
  cli.js new [path]      Creates a new CameronJS app
  cli.js destroy [path]  Removes a CameronJS app
  cli.js dev             Start a web server and watch codebase for changes
  cli.js build           Builds production-ready assets into /publish
  cli.js serve           Starts a web server to serve the /publish directory
  cli.js netlify         Starts a netlify dev instance for local testing of
                         functions

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number

Okay lets try the other commands

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs dev .
Try `cameronjs --help` for usage options

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs dev ./
Try `cameronjs --help` for usage options

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs serve
Try `cameronjs --help` for usage options

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs serve ./
Try `cameronjs --help` for usage options

jaceb@home MINGW64 ~/git/camerontest (master)
$ cameronjs serve ~
Try `cameronjs --help` for usage options

Okay, maybe the package.json will have a hint on how to get this running

  "scripts": {
    "build": "webpack && postcss --verbose code/stylesheets/application.pcss -o publish/stylesheets/application.css",
    "clean": "del 'publish/!(images|favicon.*)'",
    "dev": "$npm_execpath serve & $npm_execpath watch",
    "netlify": "$npm_execpath watch & netlify dev",
    "rebuild": "$npm_execpath clean && $npm_execpath build",
    "serve": "live-server --watch=./publish --mount=/:./publish --entry-file='publish/404.html'",
    "watch": "webpack --watch & postcss --verbose code/stylesheets/application.pcss -o publish/stylesheets/application.css --watch"
  },

Looks like I can just run dev here or serve
yarn serve works but it renders

<html lang="en"><head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>


</body></html>

the /code/html/index.html has a bunch of stuff but I can't get that to render here.

Oh I'll try to build first then to serve. Success

@cannikin
Copy link
Owner

cannikin commented Sep 7, 2021

Thanks for taking the time to write all this up! I don't have a Windows machine to test any fixes and, honestly, no one is really using this besides me, so I can't justify the time it would take to diagnose and fix!

@jacebenson
Copy link
Author

I was able to get it running w/ yarn build && yarn serve.

The syntax is different than I'm used to, but I thoguht i'd give it a full try.

I'll try to add some PR's to add the details about layouts docs here.

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