2

I get this error in windows CMD:

> [email protected] build:get-releases C:\Users\Karol\Desktop\wbs
> src/scripts/downloadReleases.js fastify/fastify build-temp/releases/ v0.11.0

'src' is not recognized as an internal or external command,
operable program or batch file.

My package.json:

"name": "fastify-website",
  "version": "1.0.0",
  "description": "A static website builder for metalsmith",
  "scripts": {
    "build:cleanup": "rimraf build-temp",
    "build:create-temp-folder": "mkdirp build-temp",
    "build:get-releases": "src/scripts/downloadReleases.js fastify/fastify build-temp/releases/ v0.11.0",

Description

so basically npm start works till it gets to script "build:get-releases"... I tried messing with package json but didnt help, also, the directory src/scripts/downloadReleases.js DOES exist.

Is it because it was written typically for linux and im using windows? Because im ready to install linux if its true, but i need confirmation

(PS i downloaded this straight from github and it should be working, so my assumption was linux can read this specific content of package.json file properly)

3
  • Assuming src/scripts/downloadReleases.js is a node script, what is the output if you add node it to like so: node src/scripts/downloadReleases.js ... Commented Mar 5, 2019 at 16:05
  • try replacing the "/" in paths by "\" for windows Commented Mar 5, 2019 at 16:06
  • thanks @Kaddath, that solved the issue, however im getting next error. i guess ill just install linux. thanks again i wouldnt find it on my own Commented Mar 5, 2019 at 16:19

1 Answer 1

1

Yes it is because you are not using linux.

Windows has no support for shebangs, which downloadReleases.js uses. You can see it on line 1:

#!/usr/bin/env node

That line tells the operating system where to find the proper interpreter for the script. A simple fix that you or the author could make would be to use the interpreter in the command like so:

node src/scripts/downloadReleases.js fastify/fastify build-temp/releases/ v0.11.0

This change would allow either windows and linux users to run the scripts as long as they have node installed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.