empress / empress-blog

Fully-functional, SEO friendly static site implementation of a blog system built on Ember
https://empress-blog.netlify.app/
MIT License
180 stars 30 forks source link

Found an unknown transformation name cjs #3

Closed ishu3101 closed 6 years ago

ishu3101 commented 6 years ago

I am trying to use ember ghost. I follow the instructions in the README.md and run the below command

npm install -g ember-cli

ember new super-blog
cd super-blog
ember install ember-ghost ember-ghost-casper-template

Now when I run npm start, I am getting the following error message.

Could not start watchman Visit https://ember-cli.com/user-guide/#watchman for more info. while import node_modules/downsize-cjs/index.js: found an unknown transformation name cjs. Available transformNames are: amd

mansona commented 6 years ago

@ishu3101 there seems to be a slight issue installing some dependencies just after the install of this addon

To fix this run:

ember install prember@0.3.0 ember-cli-cjs-transform ember-cli-fastboot ember-moment

You should have seen at the bottom of the original install:

install addons prember@0.3.0, ember-cli-cjs-transform, ember-cli-fastboot, ember-moment

but for some reason, this task didn't complete 🤔

ishu3101 commented 6 years ago

@mansona The message did not show up at the bottom of the original install.

Now when I run npm start, I am getting this error message.

Error: You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: The host header did not match a hostWhitelist entry.

mansona commented 6 years ago

@ishu3101 can you tell me what version of ember-ghost is in your package.json please. I should have already fixed that issue 🤔

ishu3101 commented 6 years ago

"ember-ghost": "^1.1.2"

mansona commented 6 years ago

@ishu3101 what are you using to view this app when it's running? are you going to https://localhost:4200?

ishu3101 commented 6 years ago

I'm using Chrome. By default it is going to port 8080 ie: http://localhost:8080

ishu3101 commented 6 years ago

I managed to get it working by adding

fastboot: {
      hostWhitelist: [process.env.C9_HOSTNAME]
},

to the ENV variable.

So it looks like this.

let ENV = {
...
 fastboot: {
      hostWhitelist: [process.env.C9_HOSTNAME]
 },
...
}

Note: I'm using the C9_HOSTNAME environment variable here because I'm using this on Cloud9 IDE. If you are on your own computer just replace that with localhost:8080 or the port you are using.

mansona commented 6 years ago

@ishu3101 thank you for answering all my questions. It's interesting that you're using Cloud9 and it's not working. I have a feeling that they are using some hostname internally (as you suggest with process.env.C9_HOSTNAME) that isn't covered by the automatic configuration rules.

I hope you don't mind but I'm going to close this issue because you're sorted now. I would love to know if there is a quickstart guide for me to try and recreate your setup so I can check if we can make this more straightforward for people in the future. Is there a quickstart guide that you were using for this AWS cloud9? (I used to use cloud9 a long time ago)

ishu3101 commented 6 years ago

When you create a new workspace in Cloud9, you can select from a list of available work spaces which includes nodejs, python, rails, wordpress among others. So I just selected a node js workspace from the list after which Cloud9 sets up a node environment. After that I just followed the instructions in the Quick start guide in the README.md for this project and the issues I encountered along the way were mentioned above.