Git Product home page Git Product logo

Comments (8)

coolaj86 avatar coolaj86 commented on June 15, 2024 1

I ran into this today:

npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "$": name can only contain URL-friendly characters

The workaround, of course, was

rm node_modules/\$
npm install

Voting again for @.

from basetag.

janniks avatar janniks commented on June 15, 2024

Thanks for the feedback!

Fun fact: The package was called at-base previously and used the @. Unfortunately, node/npm treat it a bit differently and using the @ would delete/move files in actual projects (very weird bug to figure out). But I guess this is somewhat related to the usage of @name/package in npm.

The @ would have been my first choice too. I thought about using the ยง but that's also strange.

from basetag.

janniks avatar janniks commented on June 15, 2024

Does the shell variable escaping give you any problems when using basetag?

from basetag.

coolaj86 avatar coolaj86 commented on June 15, 2024

Does the shell variable escaping give you any problems when using basetag?

No, and yes. I did ls node_modules/$ which, of course, didn't work. More user error than anything.

@ would delete/move files in actual projects

Do you have any more details on that? I've submitted patches to npm before and I might look into it... someday.

from basetag.

janniks avatar janniks commented on June 15, 2024

Got it!

I've been thinking about a customizable basetag symbol for v2. Could be done via an optional package.json attribute or .basetagrc or similar. Users could use the default or customize to whatever.

Should be a super simple feature, I'll test it out over the next days and see if there's an issue with @...

from basetag.

tuomassalo avatar tuomassalo commented on June 15, 2024

@coolaj86

Do you have any more details on that? I've submitted patches to npm before and I might look into it... someday.

See https://gist.github.com/branneman/8048520#gistcomment-3009096 for some (scarce) details.

from basetag.

janniks avatar janniks commented on June 15, 2024

Good catch! Maybe this was the issue I though I was having with @.

I will do some investigating and think of a solution (maybe combined with #18 )

from basetag.

janniks avatar janniks commented on June 15, 2024

Damn ๐Ÿ˜ฌ

You can try to use @ for a project (that you have backed up somewhere). Last time I tried, npm started deleting random folders in my local project. I think this is due to @ being used in GitHub username handling e.g. import from @janniks/basetag. If you find @ to work โ€” great! But I'm not sure it will from a technical standpoint.

Otherwise, we might need to switch to - . _ ~ ( ) ' ! * : , ; โ€” not great ๐Ÿ™ƒ

from basetag.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.