builder icon indicating copy to clipboard operation
builder copied to clipboard

npm init builder.io or builder.io/sdk or @builder.io/cli builder.io@latest don't work.

Open nilsriga opened this issue 3 years ago • 5 comments

Thanks for wasting a couple of hours before I even had a chance to try builder.

Reinstalled node, npm, nvm, different versions, etc, etc.. nothing works.

But I just realized what's the error.

So after I npm init builder.io I get:

image

and

image

In the console.

So you know what does that error say?

That builder.io

image

Doesn't have a program associated with it

This

image

kind of program.

So that's a really dumb error. (or a dumb filename)

What am I suppose to do?

I guess I'll try finding where does the command come from and change builder.io to builder-io as well as in the folder.

nilsriga avatar Feb 22 '22 23:02 nilsriga

Can't find it.

But I figured out a fix. Who's the dumb one now!?

All this time I could have just written

npm init builder

instead of

npm init builder.io

(which you had all over you introduction documentation and on the front page, mind you)

🤮

I wonder why exactly I am the first one having this issue.

It made no difference whether I used cmd, powershell or git bash.

nilsriga avatar Feb 23 '22 00:02 nilsriga

Just so'd you know.

I spoke too soon previously.

If you have installed builder.io globally, you will be able to run the script with

npm init builder

but it will complain that npm isn't initialized.

well. ok.

So you

npm init

and run it again. But then it will complain that there is no node_modules folder.

Well ok. You

npm install

Good. Now it will complain that there is no webpack

Ok. than you install webpack and run it again.

And then it will throw a list of errors, in that webpack isn't configured right and you give up for a couple of hours. In my case I tried getting qwik to run, but that went nowhere. So you come back.

And did you know that

npm init 

is actually the same as

npm exec

I bet you did.

So after searching distant lands far and wide, you discover a hidden gem buried in the search results of npmjs's registry. The script mentioned in all the docs and resources available. With staggering 67 downloads.

https://www.npmjs.com/package/create-builder.io

the builder.io's cli (not builder.io/cli, mind you), with which you can

npm init builder.io

but it is not called or available under the builder.io name. That would take out all the fun.

Also, you can't npx init or exec the script, just to keep you confused.

It is called

create-builder.io

You are playing hard to get, aren't you? 😏

So but if you can't execute with npx and you can't execute it on you computer, when it's downloaded, what's the technique?

These aren't

 npx exec create-builder.io
 npm exec create-builder.io
 npm i create-builder.io
 npm init builder.io@latest
 npm init create-builder
 npm init C:\Users\user\Desktop\nfts\builder\node_modules\.bin\create-builder
 npx init C:\Users\user\Desktop\nfts\builder\node_modules\.bin\create-builder
 npm exec C:\Users\user\Desktop\nfts\builder\node_modules\.bin\create-builder
 npm init C:/Users/user/Desktop/nfts/builder/node_modules/.bin/create-builder

it's the humble

$ npm exec C:/Users/user/Desktop/nfts/builder/node_modules/.bin/create-builder

Is that it?

Did the script just ran, I pressed yes, yes, yes, and I'm ready to test whether it's a drag and drop static site generator as expected?

Of course not. Builder.io Is about getting it to run. That's the whole thing.

image

Ok. Go make a cup of tea and ready those biscuits. I'll be back.

image

I love it. This is of the nonsensical ones. Complaining that a file is not a folder.

🤮

nilsriga avatar Feb 23 '22 08:02 nilsriga

image very professional to minify the script for a faster installation experience.

Much appreciated.

nilsriga avatar Feb 23 '22 08:02 nilsriga

Ok. I cracked your code. image I got it to partially download the files.

And

Look and behold:

image

A never before seen Easter egg. A readme file from a forgotten repo

So I see now.

The script on the builder.io's front page leads the faithful to

https://github.com/BuilderIO/nextjs-builder-edge-personalization

And there's even documentation along with it. Fancy.

I guess It's smooth sailing from here on out. I would have no reason to think otherwise.

I guess I should post my issues in that repo. So these are goodbyes. Farewells.

nilsriga avatar Feb 23 '22 10:02 nilsriga

But seriously -- fix your frontpage. It takes a tat more than just

npm init builder.io@latest

Fake advertising. And get rid of the "." for windows filenames. dot io files 😅 And make some sense of the naming nomenclature for npm and their respective repos and cli commands. And fix your init script And put some links to the actual documentation in your repose for developers on your homepage, instead of just overview reiterating "npm init builder.io" And write up some documentation on how to get qwik running + why exactly does it say "with builder.io". With builder.io (as ambiguous as it is here) I understand the drag and drop UI website builder, but when I finally got it running it was just an empty page with a sentence and document.querrySelector() undefined error in the console. Not exactly the website builder experience I was advertised, before I went head first getting it to run.

Just a regular windows 10 user.

nilsriga avatar Feb 23 '22 10:02 nilsriga