highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.31k stars 3.52k forks source link

Cannot install @highlightjs/cdn-assets using npm #3920

Closed dschach closed 7 months ago

dschach commented 7 months ago

Describe the issue/behavior that seems buggy

Cannot install cdn-assets into local vscode project using npm.

Sample Code or Instructions to Reproduce Copy/past the snippet to install from https://www.npmjs.com/package/@highlightjs/cdn-assets

Enter:

npm i @highlightjs/cdn-assets

Response:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://npm.pkg.github.com/@highlightjs%2fcdn-assets - npm package "cdn-assets" does not exist under owner "highlightjs"
npm ERR! 404 
npm ERR! 404  '@highlightjs/cdn-assets@*' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:

Expected behavior

Should install the dependency in my project. I can install highlight.js, but that isn't what I need.

Additional context

Logfile:

0 verbose cli /Users/<myusername>/.nvm/versions/node/v18.17.1/bin/node /Users/<myusername>/.nvm/versions/node/v18.17.1/bin/npm
1 info using npm@10.2.3
2 info using node@v18.17.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/npmrc Completed in 0ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/<myusername>/Documents/VSCode/highlightjs-apex/.npmrc Completed in 2ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:/Users/<myusername>/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/Users/<myusername>/.nvm/versions/node/v18.17.1/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 7ms
17 timing npm:load:configload Completed in 7ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm install @highlightjs/cdn-assets
22 verbose argv "install" "@highlightjs/cdn-assets"
23 timing npm:load:setTitle Completed in 6ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:/Users/<myusername>/.npm/_logs/2023-11-09T00_44_13_346Z-
26 verbose logfile /Users/<myusername>/.npm/_logs/2023-11-09T00_44_13_346Z-debug-0.log
27 timing npm:load:logFile Completed in 4ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 25ms
31 timing arborist:ctor Completed in 0ms
32 silly logfile start cleaning logs, removing 1 files
33 silly logfile done cleaning log files
34 timing idealTree:init Completed in 23ms
35 timing idealTree:userRequests Completed in 1ms
36 silly idealTree buildDeps
37 silly fetch manifest @highlightjs/cdn-assets@*
38 timing arborist:ctor Completed in 0ms
39 http fetch GET 404 https://npm.pkg.github.com/@highlightjs%2fcdn-assets 229ms (cache skip)
40 http fetch GET 404 https://npm.pkg.github.com/@highlightjs%2fcdn-assets 136ms (cache skip)
41 silly placeDep ROOT @highlightjs/cdn-assets@ OK for: highlightjs-apex@1.3.2 want: *
42 timing idealTree:#root Completed in 374ms
43 timing idealTree:node_modules/@highlightjs/cdn-assets Completed in 0ms
44 timing idealTree:buildDeps Completed in 374ms
45 timing idealTree:fixDepFlags Completed in 1ms
46 timing idealTree Completed in 402ms
47 timing command:install Completed in 407ms
48 verbose stack HttpErrorGeneral: 404 Not Found - GET https://npm.pkg.github.com/@highlightjs%2fcdn-assets - npm package "cdn-assets" does not exist under owner "highlightjs"
48 verbose stack     at /Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:95:15
48 verbose stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
48 verbose stack     at async RegistryFetcher.packument (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:87:19)
48 verbose stack     at async RegistryFetcher.manifest (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:118:23)
48 verbose stack     at async #nodeFromEdge (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1049:19)
48 verbose stack     at async #buildDepStep (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:917:11)
48 verbose stack     at async Arborist.buildIdealTree (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:196:7)
48 verbose stack     at async Promise.all (index 1)
48 verbose stack     at async Arborist.reify (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
48 verbose stack     at async Install.exec (/Users/<myusername>/.nvm/versions/node/v18.17.1/lib/node_modules/npm/lib/commands/install.js:152:5)
49 verbose statusCode 404
50 verbose pkgid @highlightjs/cdn-assets@*
51 verbose cwd /Users/<myusername>/Documents/VSCode/highlightjs-apex
52 verbose Darwin 23.1.0
53 verbose node v18.17.1
54 verbose npm  v10.2.3
55 error code E404
56 error 404 Not Found - GET https://npm.pkg.github.com/@highlightjs%2fcdn-assets - npm package "cdn-assets" does not exist under owner "highlightjs"
57 error 404
58 error 404  '@highlightjs/cdn-assets@*' is not in this registry.
59 error 404
59 error 404 Note that you can also install from a
60 error 404 tarball, folder, http url, or git url.
61 verbose exit 1
62 timing npm Completed in 511ms
63 verbose unfinished npm timer reify 1699490653444
64 verbose unfinished npm timer reify:loadTrees 1699490653448
65 verbose code 1
66 error A complete log of this run can be found in: /Users/<myusername>/.npm/_logs/2023-11-09T00_44_13_346Z-debug-0.log
joshgoebel commented 7 months ago

No idea? Worked here, first attempt.

Screen Shot 2023-11-08 at 8 37 08 PM
dschach commented 7 months ago

probably PBKAC. Will keep trying.

dschach commented 7 months ago

Found problem: Had .npmrc file with @highlightjs:registry=https://npm.pkg.github.com No idea why. Commented line and everything was great - will figure out why it was there.