Open kamioftea opened 6 years ago
Is the command simply npm install
?
Could you share the package.json if possible?
The commands tried have been:
find {{ release_path }} -name "webpack.production.config.js" ! -path "*/node_modules/*" -print0 | xargs -0 -I path /bin/sh -c 'cd "$(dirname path)"; npm install; npm run build --if-present'
Which runs until find matches a file, and xargs calls npm install
. This was previously working in 0.0.45.
I also tried setting up a command to install and build a specific module:
cd {{release_path}}/modules/ThirdParty/view/third-party/third-party-approval/react
npm install
npm run build
And again this executed the cd ...
and then failed on running npm install
.
The package.json is:
{
"name": "third-party-approvals",
"version": "0.0.1",
"description": "Third party approval page app",
"author": "Jeff Horton <jeff.horton@hightechclick.com>",
"scripts": {
"start": "webpack --config webpack.development.config.js -w --progress",
"build": "webpack --config webpack.production.config.js --define process.env.NODE_ENV=\"'production'\""
},
"dependencies": {
"babel-cli": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.11",
"draft-js": "^0.10.5",
"immutable": "^3.8.2",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "^0.4.0",
"npm": "^5.8.0",
"optimize-css-assets-webpack-plugin": "^4.0.0",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"react-dropzone": "^4.2.9",
"react-redux": "^5.0.7",
"redux": "^3.7.2",
"redux-observable": "^0.18.0",
"rxjs": "^5.5.10",
"uglify-es": "^3.3.10",
"uglifyjs-webpack-plugin": "^1.2.5",
"url-loader": "^1.0.1",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.15",
"webpack-stream": "^4.0.3"
}
}
Really sorry for the late reply, I'd missed you reply.
If it isn't working still can you run artisan app:debug
, then try a deploy again and share the latest whole
I've updated to the current master and run a deploy. Here are the logs produced from server startup, then running the deploy at 12:04:02, which failed at 12:09:14.
Let me know if there's anything else you need.
Thanks.
I have managed to work around this by silencing output from the commands using > /dev/null 2>&1
. From trial and error it seems to be something to do with the various command characters for color/cursor position used by npm/webpack.
Before submitting your issue, please make sure that you've checked all of the checkboxes below.
php -v
composer install --no-dev
from the root of your installation.npm install --production
from the root of your installation.rm -rf bootstrap/cache/*
from the root of your installation.To help us better understand your issue, please answer the following.
This is possibly related to #333 I have followed the advice at the bottom of that thread to update to master and I'm still experiencing the issue.
Expected behaviour
Deployer to run npm install command on remote server.
Actual behaviour
As soon as the command executes npm install the remaining steps in the deploy are marked as cancelled, but the running command still shows as running. The below stack trace is logged at the same time. Sometimes a snippet of the start of the npm command is shown in the console log, e.g.
But normally there is no output logged before the deploy fails.
As there are multiple javascript modules to build I have a find command that locates them and uses xargs runs npm install for each. In this case the command runs successfully until the first invocation of npm install at which point it errors as described. As part of debugging I have setup the command with each npm install set included manually. In this case the command errors almost immediately - as soon as the first npm install is executed.
Steps to reproduce
Include a command in a deploy that executes npm install
Environment info
Laravel Environment
Laravel Version: 5.4.36
Server Environment
Installed Packages & their version numbers
Extra Information
Node
node -v
v6.14.1npm -v
3.10.10Logs (see storage/logs/) or other output that would be helpful
from: cli-2018-04-27.log