Closed lverns closed 6 years ago
I'm not that familiar with npm but I suspect this is something in puppet itself since you use the package
resource. Could it be that it should be angular/cli@1.0.0
and the leading @
is tripping it up?
I took the @
off and while puppet still claims to run correctly, ng
is not made accessible on the PATH
. (Note that the first @
is part of the package name.)
I now see this on every run:
Notice: /Stage[main]/Npm_packages/Package[typescript]/ensure: created
Notice: /Stage[main]/Npm_packages/Package[angular/cli@1.0.0]/ensure: created
Re-adding the @
changes the output to
Notice: /Stage[main]/Npm_packages/Package[typescript]/ensure: created
Notice: /Stage[main]/Npm_packages/Package[@angular/cli@1.0.0]/ensure: created
but still doesn't properly install Angular CLI.
So the package is only properly installed on clients that were first run with the @
present, and I looks like I'll have to do some manual manipulation to get the other test boxes back into a good state.
I enabled the debug and it effectively runs
==> default: Notice: /Stage[main]/Main/Package[webpack-dev-server]/ensure: created
==> default: Debug: /Package[webpack-dev-server]: The container Class[Main] will propagate my refresh event
==> default: Debug: Executing: '/usr/bin/npm list --json --global'
==> default: Debug: Executing: '/usr/bin/npm install --global @angular/cli'
but it hangs, no idea if it's because the dependencies are many, but it doesn't make sense because from a Vagrant instance without it, I was able to run it and it doesn't take that much.
I wonder what /usr/bin/npm list --json --global
shows. Does it include @angular/cli
?
I've moved @angular/cli
installation to a command execution and after 5 mins I get a timeout, not just infinitely stuck:
==> default: Debug: Exec[Install Angular CLI](provider=posix): Executing '/usr/bin/npm install --global @angular/cli'
==> default: Debug: Executing: '/usr/bin/npm install --global @angular/cli'
==> default: Error: Command exceeded timeout
==> default: Error: /Stage[main]/Main/Exec[Install Angular CLI]/returns: change from notrun to 0 failed: Command exceeded timeout
Then executing:
/usr/bin/npm list --global --depth=0
it's indeed installed, so it's a problem with the return status?
/usr/lib
├── @angular/cli@1.4.2
My expertise is puppet, not nodejs. This feels like an issue with nodejs/npm itself so I'm afraid I can't be of any help.
There has been no recent correspondence on this, closing.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
On the server, I have the following class:
What are you seeing
ng seems to be properly installed, but every time I run the client, I see the following entry in the log:
What behaviour did you expect instead
I would expect to only see this entry the first time the client runs.