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

running commands is broken due to missing dependency when using 0.10.0-alpha.0 release #445

Closed
1 of 5 tasks
thescientist13 opened this issue Dec 13, 2020 · 0 comments · Fixed by #447
Closed
1 of 5 tasks
Assignees
Labels
alpha.1 bug Something isn't working CLI P0 Critical issue that should get addressed ASAP v0.10.0

Comments

@thescientist13
Copy link
Member

thescientist13 commented Dec 13, 2020

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

When installing latest alpha.0 there is an error for a missing dependency; fs-extra.

% npm run develop

> [email protected] develop /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started
> greenwood develop

internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'fs-extra'
Require stack:
- /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/lifecycles/config.js
- /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/lifecycles/compile.js
- /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/commands/build.js
- /Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/lifecycles/config.js:1:12)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/lifecycles/config.js',
    '/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/lifecycles/compile.js',
    '/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/commands/build.js',
    '/Users/owenbuckley/Workspace/project-evergreen/repos/greenwood-getting-started/node_modules/@greenwood/cli/src/index.js'
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] develop: `greenwood develop`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] develop script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/owenbuckley/.npm/_logs/2020-12-13T16_15_30_792Z-debug.log

Temporary work around for now that works is to install fs-extra into the project locally.

Details

Looks like somewhere along the way we were using fs-extra
Screen Shot 2020-12-13 at 11 10 08 AM

Looks like right now it is just coming from Lerna.

% yarn why fs-extra
yarn why v1.12.3
[1/4] 🤔  Why do we have the module "fs-extra"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "_project_#lerna#@lerna#create" depends on it
   - Hoisted from "_project_#lerna#@lerna#create#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#import#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#init#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#publish#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#version#@lerna#conventional-commits#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#bootstrap#@lerna#npm-install#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#publish#@lerna#npm-publish#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#exec#@lerna#profiler#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#bootstrap#@lerna#symlink-binary#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#bootstrap#@lerna#symlink-dependencies#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#bootstrap#@lerna#symlink-binary#@lerna#create-symlink#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#publish#@lerna#pack-directory#@lerna#get-packed#fs-extra"
   - Hoisted from "_project_#lerna#@lerna#bootstrap#@lerna#symlink-dependencies#@lerna#resolve-symlink#fs-extra"
info Disk size without dependencies: "284KB"
info Disk size with unique dependencies: "376KB"
info Disk size with transitive dependencies: "376KB"
info Number of shared dependencies: 3
✨  Done in 0.68s.

Normal fs should be fine, but it is also fine if it's kept around as just a devDependency too.

@thescientist13 thescientist13 added bug Something isn't working P0 Critical issue that should get addressed ASAP labels Dec 13, 2020
@thescientist13 thescientist13 self-assigned this Dec 13, 2020
@thescientist13 thescientist13 changed the title running commands breaks is broken on missing dependency when installing alpha.0 running commands is broken due to missing dependency when using 0.10.0-alpha.0 release Dec 13, 2020
@thescientist13 thescientist13 linked a pull request Dec 14, 2020 that will close this issue
@thescientist13 thescientist13 mentioned this issue Dec 20, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.1 bug Something isn't working CLI P0 Critical issue that should get addressed ASAP v0.10.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant