Skip to content
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

Dependencies (@cloudstek/cache) are not being fully installed using either npm or yarn #23

Closed
signe opened this issue Jan 26, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@signe
Copy link

signe commented Jan 26, 2020

Debugging info after running workflow installed with npm install -g alfred-atom:

[15:24:48.607] Logging Started...
[15:24:55.066] Atom[Script Filter] Queuing argument '(null)'
[15:24:55.316] Atom[Script Filter] Script with argv '(null)' finished
[15:24:55.319] ERROR: Atom[Script Filter] Code 1: internal/modules/cjs/loader.js:323
      throw err;
      ^

Error: Cannot find module '/usr/local/lib/node_modules/alfred-atom/node_modules/@cloudstek/cache/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:315:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:703:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:967:27)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/alfred-atom/node_modules/alfred-hugo/dist/hugo.js:21:17)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/alfred-atom/node_modules/alfred-hugo/dist/index.js:7:14)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/alfred-atom/dist/index.js:15:23)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
 {
  code: 'MODULE_NOT_FOUND',
  path: '/usr/local/lib/node_modules/alfred-atom/node_modules/@cloudstek/cache/package.json',
  requestPath: '@cloudstek/cache'
}

After installing using yarn global add alfred-atom:

[15:27:01.179] Logging Started...
[15:27:10.706] Atom[Script Filter] Queuing argument '(null)'
[15:27:10.893] Atom[Script Filter] Script with argv '(null)' finished
[15:27:10.905] ERROR: Atom[Script Filter] Code 1: internal/modules/cjs/loader.js:323
      throw err;
      ^

Error: Cannot find module '/Users/signe/.config/yarn/global/node_modules/@cloudstek/cache/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (internal/modules/cjs/loader.js:315:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:703:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:967:27)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/signe/.config/yarn/global/node_modules/alfred-hugo/dist/hugo.js:21:17)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/signe/.config/yarn/global/node_modules/alfred-hugo/dist/index.js:7:14)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/signe/.config/yarn/global/node_modules/alfred-atom/dist/index.js:15:23)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
 {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/signe/.config/yarn/global/node_modules/@cloudstek/cache/package.json',
  requestPath: '@cloudstek/cache'
}

If you navigate to the workflow directory after installing with npm or yarn, and then run yarn again to install the dependencies:

[15:34:24.118] Atom[Script Filter] Queuing argument '(null)'
[15:34:24.401] Atom[Script Filter] Script with argv '(null)' finished
[15:34:24.405] Atom[Script Filter] {
	"items": [
		{
			"uid": "MS1EZWZhdWx0IFNjcmF0Y2ggLSBBdG9tL1VzZXJzL3NpZ25lL0RvY3VtZW50cw==",
			"title": "1-Default Scratch - Atom",
			"subtitle": "/Users/signe/Documents",
[...]
@mdeboer
Copy link
Member

mdeboer commented Jan 28, 2020

That is odd, I'll have a go at reproducing this.

In the meanwhile, can you verify this also happens when you delete the workflow (or just node_modules dir) and delete the NPM or Yarn global cache?

@signe
Copy link
Author

signe commented Jan 28, 2020

Yes, I've cleared all caches and reinstalled the Workflow using both yarn and npm and I see the same behavior each time.

% node --version
v13.7.0
% npm --version
6.13.6
% yarn --version
1.21.1

@mdeboer mdeboer added this to the v3.0.4 milestone Jan 31, 2020
@mdeboer mdeboer added the bug label Jan 31, 2020
@mdeboer mdeboer self-assigned this Jan 31, 2020
@mdeboer
Copy link
Member

mdeboer commented Feb 5, 2020

This is fixed in v3.0.4 👍

@mdeboer mdeboer closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants