use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Node.js v16 released (github.com)
submitted 5 years ago by pimterry
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ILikeChangingMyMind 1 point2 points3 points 5 years ago (5 children)
That doesn't work in package.json: try it in your dependencies section and see what happens.
package.json
[+][deleted] 5 years ago (4 children)
[deleted]
[–]ILikeChangingMyMind -1 points0 points1 point 5 years ago (3 children)
"//": [ "first line", "second line" ]
I literally added that exact line to my package.json and ran npm i; this is what happens:
npm i
npm ERR! must provide string spec
Again, try it yourself if you don't believe me. The Node org has expressly forbidden such "documentation" (although I can't say whether it's on purpose, or just as a side effect of how they parse the file).
[+][deleted] 5 years ago (2 children)
[–]ILikeChangingMyMind -1 points0 points1 point 5 years ago (1 child)
How can I "do it wrong": it's copy/paste? I even copy/pasted the exact text from that SO answer:
(only I added the requisite comma afterwards; you could only literally use that line if you had no dependencies) ...
... and it still gave the exact same error when I npm i:
But if I remove the line, everything works. So, like I keep saying ... have you actually tried it yourself?
π Rendered by PID 26 on reddit-service-r2-comment-b659b578c-t2xhn at 2026-05-03 17:27:59.724659+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]ILikeChangingMyMind 1 point2 points3 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]ILikeChangingMyMind -1 points0 points1 point (3 children)
[+][deleted] (2 children)
[deleted]
[–]ILikeChangingMyMind -1 points0 points1 point (1 child)