我不知道为什么,但不可能推动Heroku。 我没有找到错误:/。 感谢您^^的帮助。
这是一个带有 React 客户端的快速应用程序(使用指南针(
构建包 -> https://github.com/stephanmelzer/heroku-buildpack-nodejs-grunt-compass.git
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 9.11.1
engines.npm (package.json): unspecified (use default)
Resolving node version 9.11.1...
Downloading and installing node 9.11.1...
Using default npm version: 5.6.0
-----> Restoring cache
Skipping cache restore (new-signature)
-----> Building dependencies
Installing node modules (package.json + package-lock)
added 365 packages in 8.599s
-----> Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
-----> Pruning devDependencies
Skipping because npm 5.6.0 sometimes fails when running 'npm prune' due to a known issue
https://github.com/npm/npm/issues/19356
You can silence this warning by updating to at least npm 5.7.1 in your package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version
-----> Build succeeded!
-----> Node.js app detected
-----> Requested node range: 9.11.1
-----> Resolved node version: 9.11.1
-----> Downloading and installing node
! Push rejected, failed to compile Node.js app.
! Push failed
您必须在.gitignore
中添加npm
依赖项文件夹(node_modules
(
这里
请按照以下步骤将数据推送到 heroku。
- Heroku 创建"应用名称">
- Heroku git:clone -a "创建的应用程序名称">
- Heroku git:Remote -a "App Name">
- git add .
- git commit -am "Initial Submitmit">
- git pull heroku master
- git push heroku master
Inside package.json add
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "node app.js"
} 有关更多详细信息,请访问 - https://www.heroku.com/nodejs