MineIsMine
MineIsMine

Reputation: 454

i tried to install ojet-cli globlay like Oracle said on linux ubuntu but ojet command not found

I've Ubuntu OS 18.04 LTS , npm: '6.4.1', ares: '1.14.0', cldr: '32.0.1', http_parser: '2.7.1', icu: '60.2', modules: '57', nghttp2: '1.30.0', node: '8.10.0', openssl: '1.1.0g', tz: '2017c', unicode: '10.0', uv: '1.18.0', v8: '6.2.414.50', zlib: '1.2.11' .

When ojet-cli installation process finished fine without any complain, but ojet command not found also, when i tried this command

npm list -g ojet-cli

output

~$ npm list -g @oracle/ojet-cli /home/tsam/.npm-global/lib

└── [email protected]

also tried to install ojet-cli package many times also tried to install npm by this command "useless"

sudo npm install npm

nothing happen

another thing : i tried to run this command

npm run ojet

output :

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'ojet' ] 2 info using [email protected] 3 info using [email protected] 4 verbose config Skipping project config: /home/tsam/.npmrc. (matches userconfig) 5 verbose stack Error: ENOENT: no such file or directory, open '/home/tsam/package.json' 6 verbose cwd /home/tsam 7 verbose Linux 4.15.0-36-generic 8 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "ojet" 9 verbose node v8.10.0 10 verbose npm v6.4.1 11 error path /home/tsam/package.json 12 error code ENOENT 13 error errno -2 14 error syscall open 15 error enoent ENOENT: no such file or directory, open '/home/tsam/package.json' 16 error enoent This is related to npm not being able to find a file. 17 verbose exit [ -2, true ]

Upvotes: 0

Views: 610

Answers (1)

MineIsMine
MineIsMine

Reputation: 454

Problem :

ojet command not found

Cause : npm install packages in location not match executed command path, when checked npm configuration by

npm config get

I found it

prefix = "/home/tsam/.npm-global"

Solution :

change environment path to this path + /bin like that

export PATH=$PATH:~/.npm-global/bin

to make this configuration permanent , you have to change it from

~/.profile file and save it.

Upvotes: 2

Related Questions