问题
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