Closed hiqsol closed 5 years ago
Can you post the composer.json
you're running the update with?
Although if npm
works directly, you're also running with node 4, which reached its EOL https://github.com/nodejs/Release#release-schedule
It's yii-twig package. (fixed tests there)
When I run composer update
with empty or removed node_modules dir it works fine.
But after running composer update
for second time I get this error.
Same mistake
Reading package.json
Merging Composer dependencies in the asset package
Updating npm dependencies
Executing command (CWD): npm update
npm ERR! Linux 3.10.0-862.11.6.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! Cannot read property 'version' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Linux 3.10.0-862.11.6.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! Cannot read property 'version' of undefined
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/app.cjtterabyte.com/public_html/npm-debug.log
Fallback to previous state for the Asset package
Fallback to previous state for Composer
the problem is with npm, and usually in centos7 this npm v.3 configure foxy with yarn and it works perfect.
"config": {
"foxy": {
"enable-packages": {
"*": true
},
"manager": "yarn"
}
},
When I have deploped this plugin, I worked with the last version of NPM and Yarn, that is NPM v5.0. By default, I did not add the minimum version values for NPM or Yarn, but it is might be nice to add default values.
I can try to look at the problem to make it compatible with NPM less than v5, but in this case, I need a complete example (with the dependencies) of a composer file.
I don't have much time available at the moment, so I don't know when I could look at it, but if you have a PR to propose, to have the support quickly, do not hesitate ;-).
Given that the NPM 5.0 has 2 years old, I just defined the compatible minimum versions of asset managers (>=5.0 for NPM and >=1.0 for Yarn).
Of course, if you want compatibility with NPM <5.0, you can create a PR for this. I close this issue.
I get this error when running
composer update
(with foxy):When I run
npm update
directly I receive no error.What could it be? Thank you in advance!