Cannot run parcel command

夙愿已清 提交于 2019-12-11 18:28:43

问题


I am trying to run parcel. I keep getting the following errors.

npm run start

frontend@1.0.0 start /Users/laurasaydeh/Desktop/dragonstack/frontend parcel index.html

sh: parcel: command not found npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! frontend@1.0.0 start: parcel index.html npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the frontend@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Here is my package.json file

    {
  "name": "frontend",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "parcel index.html"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "react": "^16.8.4",
    "react-dom": "^16.8.4"
  },
  "devDependencies": {
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-env": "^1.7.0",
    "babel-preset-react": "^6.24.1"
  }
}

Here is my babelrc file

{
    "presets": ["env", "react"],
    "plugins": ["transform-class-properties"]
}

I have tried cleaning the cache, re-installing npm after deleting node modules. I have also tried changing the start command to parcel build index.js.

I have no clue why this is not working

UPDATE: I believe parcel is not installing at all. Parcel not being intalled

来源:https://stackoverflow.com/questions/55272654/cannot-run-parcel-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!