Should this work in Windows Anaconda?
LorenAmelang opened this issue · 3 comments
(base) PS C:\Users\loren> npm i --global qnm
added 1 package in 1s
(base) PS C:\Users\loren> qnm lodash
could not identify package directory
I moved to:
d----- 1/12/2020 6:27 PM node_modules
(base) PS C:\Users\loren> cd node_modules
(base) PS C:\Users\loren\node_modules> qnm core-js
could not identify package directory
(base) PS C:\Users\loren\node_modules> qnm list
could not identify package directory
(base) PS C:\Users\loren\node_modules> which qnm
which : The term 'which' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
- which qnm
-
+ CategoryInfo : ObjectNotFound: (which:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
(base) PS C:\Users\loren\node_modules>
Maybe just not going to work? But it seemed to install...
Hi @LorenAmelang
The first error that you've seen is that qnm wasn't able to find a package directory (here)
This means it's trying to traverse upwards to find a package.json
(using this package)
This means that the directory that you chose or any directory above it doesn't have a package.json
file.
I think that you're using Windows command prompt, but which
is a linux command, so it didn't work.
The fact that you've got the error message means that the package was installed correctly, you can run qnm --help
to verify.
Played with this some more. It can work in Windows Anaconda!
(base) PS C:\Users\loren> cd "C:\Users\loren\Documents\Psychoros\Gridsome Test\bulma"
(base) PS C:\Users\loren\Documents\Psychoros\Gridsome Test\bulma> ls
Directory: C:\Users\loren\Documents\Psychoros\Gridsome Test\bulma
Mode LastWriteTime Length Name
---- ------------- ------ ----
...
d----- 11/30/2022 5:21 PM node_modules
-a---- 5/3/2020 4:50 PM 625420 package-lock.json
-a---- 5/3/2020 4:49 PM 1209 package.json
...
(base) PS C:\Users\loren\Documents\Psychoros\Gridsome Test\bulma> qnm list
@babel/code-frame
├── 7.0.0 (@babel/core, @babel/template, @babel/traverse...)
├─┬ @babel/template
│ └── 7.18.6
├─┬ @babel/traverse
│ └── 7.18.6
└─┬ gridsome
└── 7.18.6
@babel/compat-data
└── 7.20.5 (@babel/helper-compilation-targets, @babel/plugin-proposal-object-rest-spread, @babel/preset-env...)
...
But it needs both node_modules and package.json in the directory you run it from:
(base) PS C:\Users\loren\node_modules\core-js> ls
Directory: C:\Users\loren\node_modules\core-js
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 12/5/2019 9:02 PM es
d----- 12/5/2019 9:02 PM features
d----- 12/5/2019 9:02 PM internals
d----- 12/5/2019 9:02 PM modules
d----- 12/5/2019 9:02 PM proposals
d----- 12/5/2019 9:02 PM stable
d----- 12/5/2019 9:02 PM stage
d----- 12/5/2019 9:02 PM web
-a---- 10/26/1985 1:15 AM 1043 configurator.js
-a---- 10/26/1985 1:15 AM 123 index.js
-a---- 10/26/1985 1:15 AM 1064 LICENSE
-a---- 12/5/2019 9:02 PM 1948 package.json
-a---- 10/26/1985 1:15 AM 2037 postinstall.js
-a---- 10/26/1985 1:15 AM 5499 README.md
(base) PS C:\Users\loren\node_modules\core-js> qnm list
could not find node_modules directory
(base)
That "modules" doesn't qualify... Nor does "node_modules" being in the parent directory. Seems to need both in the current directory,
Great, thanks @LorenAmelang. Closing