Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Npm ERR! Line breaks can’t be quoted on Windows

Tags:

node.js

npm

i have the following package.json code:

{
    "name": "pre-post",
    "version": "1.0.0",
    "description": "",
    "main": "basic-server.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" && exit 1",
      "ignore": "echo \"\" >> .gitignore",
      "preignore": "touch .gitignore",
      "postignore": "echo \".gitignore\n.vscode/\nnode_modules/\" >> .gitignore"
    },
    "keywords": [],
    "author": "",
    "license": "ISC",
    "dependencies": {
      "linebreak": "^1.0.2",
      "open": "^7.4.0"
    }
}

after i run in node js command, i have the error message of npm ERR! Line breaks can't be quoted on Windows, any fix?

like image 308
bim2016 Avatar asked Nov 16 '22 00:11

bim2016


1 Answers

Check whether your package.json have swiper

There are 4 steps to solve this problem

  1. Remove "swiper" : "^5.4.5" from package.json file.(Check there should be no comma in last line of your json file)
  2. Run npm install command in your terminal.
  3. Run npm install swiper command.
  4. Now you will see everything has been installed successfully.
like image 144
Harsh Soni Avatar answered Dec 09 '22 22:12

Harsh Soni