-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command not found after installing npm package #572
Comments
As for finding the node-sass version in the container, this helped.
Also got node-sass to work fine in the container, in addition use grunt-crontib-watch to watch for changes and faced the
error, however I was able to fix that with
and then
being outside the container. As for npm-check-updates I have not gotten any further. No matter how I install it, with sudo, as root, it cannot find the |
The PHP-FPM container uses Once you're done choosing a version all They are available, but not in the path of the current shell. I am myself are also not too familiar with npm/nvm and I don't know how to automatically populate the path of them. All existing packages (which come by default) have been symlinked from: TL;DR Your packages are here: |
Thank you for your reply. Tried the direct folder location you mentioned, see the global installed packages there, still when issuing the command it just cannot find the package. Going to keep trying. Perhaps I manage somehow and if I do I will report back. Would be super sweet to be able to just npm install inside the container and project folder and have everything sorted and ready to go. |
@robots4life I've added npm binaries location to bash $PATH and they will be available directly after install. PR is here: #582 |
Normally you can use the bin executables either by calling them in an npm script or by using node's npx command on cli: |
ISSUE TYPE
Checklist
.env
file is attacheddocker-compose.override.yml
is attached (if it exists)cfg/
dir are attached (if customized)docker-compose logs
andlog/
output is addedOS / ENVIRONMENT
Host operating system and version:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
(Windows) Native Docker or Docker Toolbox: -
Docker version: Docker version 18.09.5, build e8ff056
Docker Compose version: docker-compose version 1.23.2, build 1110ad01
(Linux) Is SELinux enabled?: -
What git commit hash are you on?: -
SUMMARY
Entering PHP container with ./shell.sh.
Installing npm packages does not seem to work
STEPS TO REPRODUCE
Run
npm install -g npm-check-updates
Run
ncu -v
command not found
https://www.npmjs.com/package/npm-check-updates
Run
npm install -g npm-check
Run
npm-check
command not found
https://github.com/dylang/npm-check
Run
npm install node-sass
Run
node-sass -v
command not found
https://www.npmjs.com/package/node-sass
EXPECTED BEHAVIOUR
See the version number of the installed npm package.
The package can be installed globally or locally.
ACTUAL BEHAVIOUR
command not found is returned
OTHER INFORMATION
Start command
File and user permissions (Linux & MacOS)
Hi Cytopia,
new to Devilbox and really happy with it!!
Thank you for your continuous and incredible work on it!
Regarding the issue.
When I enter the PHP container of a LAMP stack selected through the .env file I can install npm packages but cannot seem to then run them from the command line. Node and npm are installed and working in the PHP container.
I have also seen this issue #122 and did run
./update-docker.sh
and waited for all images to download the latest version.I also exited, stopped and removed all containers before starting them again.
The strange things is, node-sass for example does work within a grunt task just fine, however when I try to do a conversion on the command line it tells me command not found. So I can use the package but not from the command line inside the PHP container?
For the other 2 packages I am not sure what is going on. I cannot use them at all rom the command line. It always tells me command not found. If would be great if these could work so I can update the packages via an updated package.json file.
I have also tried to install the packages as root as show here https://devilbox.readthedocs.io/en/latest/getting-started/enter-the-php-container.html but the result is the same. The packages are somehow not recognized on the command line.
So, thank you for any help, hope I gave you all the info you need in the report.
env.txt
The text was updated successfully, but these errors were encountered: