0

当我尝试使用 npm start 启动我的反应应用程序时,它不起作用并给我以下响应。

Michaels-MBP:compare-react michaelwroquemore$ npm start

compare-react@0.1.0 start npm-run-all -p watch-css start-js

compare-react@0.1.0 start-js react-scripts start

compare-react@0.1.0 watch-css npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive

compare-react@0.1.0 build-css node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/

sh: node-sass-chokidar: command not found 错误: "watch-css" exited with 127. Michaels-MBP:compare-react michaelwroquemore$


React 应用程序服务器之前已经上线并正常工作。然后,我尝试按照以下链接的页面上指定的方式集成 bulma react 组件。 https://medium.com/frontendweb/install-react-bulma-components-in-my-react-app-3f127afd77e7

我跑了 npm install react-bulma-components

我在 index.js 文件中包含以下内容: import 'react-bulma-components/dist/react-bulma-components.min.css';

我跑了 npm install node-sass --save-dev

然后我运行 npm install bulma。

最后(仍然在 react app 文件夹中),我运行了 npm install node-sass-chokidar 和 npm install --save-dev npm-run-all。

毕竟,当我在终端中运行“npm start”时,我得到了与上面提到的相同的响应。

这是我的“脚本”包。

"scripts": {
  "build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
  "watch-css": "npm run build-css && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/ --watch --recursive",
  "start-js": "react-scripts start",
  "start": "npm-run-all -p watch-css start-js",
  "build-js": "react-scripts build",
  "build": "npm-run-all build-css build-js",
  "test": "react-scripts test",
  "eject": "react-scripts eject"
},

我认为我已经为脚本添加了所有必要的更改,但那里可能存在一些问题。

作为故障排除的最后一点,我已经尝试过运行:

npm 更新 chokidar

npm 更新 --force

关于我可以尝试什么的任何想法?

4

0 回答 0