0

I am extremely new to this so likely am using the wrong vocabulary and missing something obvious but here is what is up.

I am using npm to build an app designed with Svelte.

The problem is in one of the echo scripts (this is part of several other scrips in a package.json file):

 "build:ui:generate:css": "echo '<style>' > ./src/stylesheet.html && cat ./sidebar/public/build/bundle.css >> ./src/stylesheet.html && echo '</style>' >> ./src/stylesheet.html"

The single quotes are not being parsed(?); therefore, I get an error saying "The system cannot find the file specified". If I replace '<style>' with 'style' it works fine but it enters the single quotes in the file too.

The script runs as expected if I just copy-paste it directly into bash, so I can't understand why it won't run with npm. I am using a windows system if that is relevant.

prankur
  • 1
  • 1
  • Ok, so I realized `npm` uses cmd on Windows which doesn't accept `'` as an enclosing character. All I had to do was change the config of `npm` to use `bash` as explained here: https://stackoverflow.com/questions/55300421/how-can-i-make-npm-projects-with-bash-shell-commands-work-on-windows – prankur Sep 23 '22 at 00:26

0 Answers0