-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
remark cannot find globally installed presets #199
Comments
Super weird! This should not be like the issue you mentioned: one preset should work fine globally. What happens if you try Could you provide a list of globally installed packages, so I can debug? |
1. nodeenvI can't reproduce the problem, use nodeenv: D:\SashaDebugging>nodeenv kira_remark_env
* Install prebuilt node (11.9.0) ….. done.
symbolic link created for kira_remark_env\Scripts\nodejs.exe <<===>> node.exe
* Install npm.js (latest) …
D:\SashaDebugging>"kira_remark_env/Scripts/activate.bat"
(kira_remark_env) D:\SashaDebugging>npm install --global remark-cli remark-preset-lint-recommended
D:\SashaDebugging\kira_remark_env\Scripts\remark -> D:\SashaDebugging\kira_remark_env\Scripts\node_modules\remark-cli\cli.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\remark-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ remark-preset-lint-recommended@3.0.2
+ remark-cli@6.0.1
added 287 packages from 196 contributors in 87.392s
(kira_remark_env) D:\SashaDebugging>remark KiraRemark.md
- Kira
[Goddess][]
KiraRemark.md
1:1 warning Missing newline character at end of file final-newline remark-lint
1:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint
3:1-3:12 warning Found reference to undefined definition no-undefined-references remark-lint
‼ 3 warnings 2. Usage without configSame error: D:\SashaDebugging>remark KiraRemark.md --use remark-preset-lint-recommended
KiraRemark.md
1:1 error Error: Could not find module `preset-lint-recommended`
at addModule (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:242:27)
at use (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:203:7)
at addIn (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:197:7)
at addPreset (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:166:9)
at merge (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:150:5)
at Config.create (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\configuration.js:105:5)
at done (C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\remark-cli\node_modules\unified-engine\lib\find-up.js:148:20)
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
× 1 error 3. List of global packages
Thanks. |
Wait, so your first example ( What happens if you use nodeenv with the second example? ( |
I am trying similarly to use remark with a global install and it cannot find any plugins, even though I have indeed installed them.
.remarkrc:
Error:
|
I was just testing on another machine, from a fresh start, and I followed the README exactly and ran into similar issue. From instructions via: https://github.com/remarkjs/remark/blob/master/doc/getting-started.md
Anyone got ideas on the root cause here? |
@kortina Could you run your last example again with |
I tracked down the issue. There was a probably where I didn't have nodenv correctly prepended to my path, but I did have the nodenv binary on my path, so I think there was some sort of mismatch. Once I added the following to my export PATH="$HOME/.nodenv/bin:$PATH" |
Oh good find! |
I had the same issue, but a different solution, so I just wanted to post here in case others see this. I am on Mac. I didn't have $NODE_PATH set, so I had to add this: That fixed it. I added it to to my .zshrc file. |
#165 — possibly related issue.
1. Summary
I don't understand, how I can use globally installed remark plugins. Variant from documentation doesn't work for me.
2. Argumentation
I want to use remark not only for JavaScript projects. I can use remark for projects in another programming languages and just for my notes. I don't think, that adding many
node_modules
for each project is a good idea.3. Data
No locally installed remark plugins.
KiraRemark.md
:.remarkrc.yaml
:4. Steps to reproduce
npm install --global remark-cli remark-preset-lint-recommended
remark KiraRemark.md
5. Expected behavior
User can use only
.remarkrc.yaml
configuration file → all globally installed plugins will work.6. Actual behavior
I try:
remark KiraRemark.md --use preset-lint-recommended
remark KiraRemark.md --rc-path ".remarkrc.yaml"
.remarkrc.yaml
andremark KiraRemark.md --use preset-lint-recommended
Same error.
7. Environment
Thanks.
The text was updated successfully, but these errors were encountered: