最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

反应过来的脚本:在Ubuntu上建立反应的应用程序内的项目没有发现?

IT培训 admin 4浏览 0评论

反应过来的脚本:在Ubuntu上建立反应的应用程序内的项目没有发现?

我用这一个上reactjs工作

但是,当我部署到digitalocean ubuntu上16的顶部,我不能跑npm run build并得到了这是一个错误。

deploy@xxxx:/www/tmdb_admin$ sudo npm run build
[sudo] password for deploy: 

> [email protected] build /www/tmdb_admin
> react-scripts build

sh: 1: react-scripts: not found

npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v7.3.0
npm ERR! npm  v4.0.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tmdb_admin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tmdb_admin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tmdb_admin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /www/tmdb_admin/npm-debug.log

所以这是我的package.json文件。

{
  "name": "tmdb_admin",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "autoprefixer-stylus": "0.10.0",
    "concurrently": "3.0.0",
    "react-scripts": "0.6.1",
    "stylus": "0.54.5"
  },
  "dependencies": {
    "bulma": "^0.2.3",
    "case-sensitive-paths-webpack-plugin": "^1.1.4",
    "es6-promise": "^4.0.5",
    "font-awesome": "^4.7.0",
    "isomorphic-fetch": "^2.2.1",
    "jwt-simple": "^0.5.0",
    "react": "^15.3.2",
    "react-dom": "^15.3.2",
    "react-pagify": "^2.1.1",
    "react-redux": "^4.4.5",
    "react-router": "^2.4.0",
    "react-router-redux": "^4.0.4",
    "react-slick": "^0.14.5",
    "redux": "^3.5.2",
    "redux-thunk": "^2.1.0",
    "segmentize": "^0.4.1",
    "slick-carousel": "^1.6.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "watch": "concurrently --names 'webpack, stylus' --prefix name 'npm run start' 'npm run styles:watch'",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "styles": "stylus -u autoprefixer-stylus ./src/css/style.styl -o ./src/css/style.css",
    "styles:watch": "stylus -u autoprefixer-stylus -w ./src/css/style.styl -o ./src/css/style.css"
  }
}

这是我nodenpm版本。

deploy@xxxx:~$ node -v
v7.3.0
deploy@xxxx:~$ npm -v
4.0.5

我怎样才能解决这个问题,使npm run build作品?

谢谢!

回答如下:

今天我有同样的问题,我固定它再次运行安装。

所有你需要做的就是朗姆酒再次命令npm install到您的项目,所以你就可以再次运行npm start COMAND!

对我的作品!我希望我帮助!

反应过来的脚本:在Ubuntu上建立反应的应用程序内的项目没有发现?

我用这一个上reactjs工作

但是,当我部署到digitalocean ubuntu上16的顶部,我不能跑npm run build并得到了这是一个错误。

deploy@xxxx:/www/tmdb_admin$ sudo npm run build
[sudo] password for deploy: 

> [email protected] build /www/tmdb_admin
> react-scripts build

sh: 1: react-scripts: not found

npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v7.3.0
npm ERR! npm  v4.0.5
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: `react-scripts build`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tmdb_admin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tmdb_admin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tmdb_admin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /www/tmdb_admin/npm-debug.log

所以这是我的package.json文件。

{
  "name": "tmdb_admin",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "autoprefixer-stylus": "0.10.0",
    "concurrently": "3.0.0",
    "react-scripts": "0.6.1",
    "stylus": "0.54.5"
  },
  "dependencies": {
    "bulma": "^0.2.3",
    "case-sensitive-paths-webpack-plugin": "^1.1.4",
    "es6-promise": "^4.0.5",
    "font-awesome": "^4.7.0",
    "isomorphic-fetch": "^2.2.1",
    "jwt-simple": "^0.5.0",
    "react": "^15.3.2",
    "react-dom": "^15.3.2",
    "react-pagify": "^2.1.1",
    "react-redux": "^4.4.5",
    "react-router": "^2.4.0",
    "react-router-redux": "^4.0.4",
    "react-slick": "^0.14.5",
    "redux": "^3.5.2",
    "redux-thunk": "^2.1.0",
    "segmentize": "^0.4.1",
    "slick-carousel": "^1.6.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "watch": "concurrently --names 'webpack, stylus' --prefix name 'npm run start' 'npm run styles:watch'",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "styles": "stylus -u autoprefixer-stylus ./src/css/style.styl -o ./src/css/style.css",
    "styles:watch": "stylus -u autoprefixer-stylus -w ./src/css/style.styl -o ./src/css/style.css"
  }
}

这是我nodenpm版本。

deploy@xxxx:~$ node -v
v7.3.0
deploy@xxxx:~$ npm -v
4.0.5

我怎样才能解决这个问题,使npm run build作品?

谢谢!

回答如下:

今天我有同样的问题,我固定它再次运行安装。

所有你需要做的就是朗姆酒再次命令npm install到您的项目,所以你就可以再次运行npm start COMAND!

对我的作品!我希望我帮助!

发布评论

评论列表 (0)

  1. 暂无评论