pcanella / marko-generator

A Yeoman generator for marko
MIT License
2 stars 0 forks source link

npm install fails (no package.json) and/or cannot find module 'marko-widgets' etc #1

Open chrisfcarroll opened 7 years ago

chrisfcarroll commented 7 years ago

Hi, thanks for working on this, I had trouble getting started though. I did:

npm install -g yo
npm install -g generator-marko
yo marko

and yo told me:

I'm all done. Running npm install & bower install for you to install the required dependencies. If this fails, try running the command yourself.
...path...\Marko1\marko-component\style.less created!
...path...\Marko1\marko-component\template.marko created!
npm WARN enoent ENOENT: no such file or directory, open '...path...\Marko1\package.json'
npm WARN Marko1 No description
npm WARN Marko1 No repository field.
npm WARN Marko1 No README data
npm WARN Marko1 No license field.
   create marko-component\browser.json
   create marko-component\index.js
   create marko-component\README.md
   create marko-component\renderer.js
 conflict marko-component\style.less
? Overwrite marko-component\style.less? overwrite this and all others
    force marko-component\style.less
    force marko-component\template.marko
   create marko-component\widget.js
bower ENOENT        No bower.json present

So then I tried npm init ; bower init; node marko-component\index.js and that got me

Error: Cannot find module 'marko-widgets'

So then I tried npm install marko-widget and that told me

 UNMET PEER DEPENDENCY marko@^3.0.0

So then I tried npm install marko

But by this point I felt something wasn't right or I'd gone the wrong route. In any case, this doesn't seem like how you suggest I should install it? Any thoughts? you'll have guessed from the backslashes that I'm on windows. Node@6.9.1 npm@3.10.8

Thanks, Chris

pcanella commented 7 years ago

@chrisfcarroll thanks for reaching out! I initially used marko V2 for this tool, and not marko V3 so that's probably why. Did it create the component anyway (looks like it did), or did it not do anything?

chrisfcarroll commented 7 years ago

Mostly. The top level files are there, the mock-data & unit-test directories are empty. But perhaps my problem is that this is for adding a component to a website that already has marko working in it? Whereas I am looking for a some kind of empty or helloworld template for getting off the ground with MyfirstMarkoWebsite