These are chat archives for canjs/canjs

25th
Aug 2017
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 17:23
Screen Shot 2017-08-25 at 1.22.13 PM.png
Hey everyone, I am new to canjs. I tried following the set up instructions on canjs and I ran into the error above.
https://canjs.com/doc/guides/setup.html#StealJSandnpm
I am not sure what 's causing the error. I have stache in my node modules.
The main thing I don't understand is why the instructions add an exclamation mark to the filename of the template I am importing, but that seems irrelevant to the error I am having.
Any help would be appreciated! Thanks.
Nico R.
@nriesco
Aug 25 2017 17:27
@MikoBrandini_twitter I had the same error a while ago but I couldn’t really replicate it. It was eventually solved upgrading every package
as of the import with a exclamation mark I was told that in can 3 is not really necessary
it was required in can 2
I guess is a new project so rm -r node_modules and then npm install won’t help much
there is some sort of cache (I was never able to prove it) in npm
you might want to try that before reinstalling the modules
npm cache clean
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 17:34
@nriesco Thanks for the advice Nico! I tried removing the modules, cleaning the cache, and reinstalling the modules, but I still have the same error.
Nico R.
@nriesco
Aug 25 2017 17:35
what about upgrading all can* modules to the latest version?
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 17:42
They're all up to date. It's a new project.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 17:42
Did you install steal-stache? https://www.npmjs.com/package/steal-stache
With the extension you don't need to use !stache anymore. You just register the extension in package.json and stache files will automatically be loaded with it
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 17:56
Screen Shot 2017-08-25 at 1.56.17 PM.png
so I deleted that source and I no longer get errors.
but, "Hello World" is not appearing on the screen.
Screen Shot 2017-08-25 at 1.57.58 PM.png
I am not sure what I have to change to finish the set up.
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:14
I actually misunderstood, ignore my earlier messages.
I installed steal-stache, and I noticed that the steal package was deleted from my node-modules directory at one point. I reinstalled steal, then I manually added steal-stache as a plugin to the steal property in my package.json file.
When I npm install that, the steal package gets deleted from my node modules directory and I get that error.
Screen Shot 2017-08-25 at 2.16.19 PM.png
Gregg Roemhildt
@roemhildtg
Aug 25 2017 18:17
You should leave the "devDependencies" as is after install
"steal" should be a top level property
  "devDependencies": {
    "babel-eslint": "^7.2.3",
    "documentjs": "^0.5.0",
    "eslint": "^4.2.0",
    "steal-css": "^1.2.5",
    "steal-less": "^1.2.0",
    "steal-stache": "^3.1.0",
    "steal-tools": "^1.6.0",
    "testee": "^0.7.0"
  },
  "steal": {
    "plugins": [
      "steal-less",
      "steal-css",
      "steal-stache"
    ],
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:24
I decided to start a new directory from scratch and I noticed that steal-stache was already a package I have had installed since the beginning.
I am still where I started. I feel like there must be a mistake in the beginner instructions somewhere.
Screen Shot 2017-08-25 at 2.24.08 PM.png
Or it may be a beginner oversight from my part. I am serving this project by http-server command. Should I be using some sort of npm command?
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:40
according to the steal-stache docs, I can delete the steal script tag and use the import statement instead, which I already was in main.js.
When I do that, no more errors, but message from definemap does not appear on my screen.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 18:46
It doesn't say you should delete the steal script tag.
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:48
You're right, I misread it.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 18:48
You just don't have your package.json steal property included. See my previous comment
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:54
Your previous comment directs me to the steal-stache npm package, which I already have installed. I reinstalled it and nothing has changed in my package.json file.
I installed it from the very beginning because it's included in the instructions of how to set up a canjs project.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 18:56
You need to add this to your package.json. Its not part of your devDependencies, its a top level property, it doesn't get added automatically
    "steal": {
        "plugins": [
            "steal-stache"
        ]
    }
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:57
thank you very much!
It worked. I really appreciate your patience.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 18:57
No worries
Getting started is tricky
Miko Brandini
@MikoBrandini_twitter
Aug 25 2017 18:58
I am going to see how to get that added to the instructions, so another beginner doesn't get stuck.
Gregg Roemhildt
@roemhildtg
Aug 25 2017 19:00
There's also the steal docs https://stealjs.com/docs/steal.html#configure