question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing dependency lodash-decorators after `rwt copy`

See original GitHub issue

After building RW and copying it over to a project I get an error about a missing dependency

tobbe@XPS9550 MINGW64 ~/dev/redwood/redwood-testing (master)
$ yarn rw test
yarn run v1.22.4
$ C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\.bin\rw test
internal/modules/cjs/loader.js:1032
  throw err;
  ^

Error: Cannot find module 'lodash-decorators'
Require stack:
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\structure\dist\x\decorators.js
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\structure\dist\ide.js
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\structure\dist\index.js
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\cli\dist\commands\diagnostics.js
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\yargs\index.js
- C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\cli\dist\index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)
    at Function.Module._load (internal/modules/cjs/loader.js:898:27)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (C:\Users\tobbe\dev\redwood\redwood-testing\node_modules\@redwoodjs\structure\dist\x\decorators.js:32:25)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\@redwoodjs\\structure\\dist\\x\\decorators.js',
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\@redwoodjs\\structure\\dist\\ide.js',
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\@redwoodjs\\structure\\dist\\index.js',
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\@redwoodjs\\cli\\dist\\commands\\diagnostics.js',
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\yargs\\index.js',
    'C:\\Users\\tobbe\\dev\\redwood\\redwood-testing\\node_modules\\@redwoodjs\\cli\\dist\\index.js'
  ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is anyone else seeing this? Or is it just me? Is it (yet another) Windows issue?

I can work around it by going in to node_modules/@redwoodjs/structure and running yarn install, but that only fixes it until I run rwt copy again

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
peterpcommented, Jul 21, 2020

A temporary work around is to installed it as a dev dependency: yarn add -DW lodash-decorators

1reaction
peterpcommented, Jul 21, 2020

Just a heads up that I’m able to reproduce this now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find module "lodash" - node.js - Stack Overflow
The first command will clean the npm cache. (just to be sure) The second command will install all (missing) dependencies of the project....
Read more >
Missing lodash-decorators · Issue #310 · Shopify/polaris · GitHub
I'de notice that you guys are using lodash-decorators without defining it in package.json , that might cause errors when bundling the app, ...
Read more >
lodash-decorators - npm
A collection of decorators using lodash at it's core.. Latest version: 6.0.1, last published: 4 years ago. Start using lodash-decorators in ...
Read more >
Is your package eligible for income on Tidelift? Here's ... - Blog
Over 4000 packages are now eligible for recurring income on Tidelift. Search for your package and apply to get started if you're interested!...
Read more >
EPEL 7 for x86_64 - RPMFind
commands · contactgroups · contacts · dependencies · escalations · hostgroups · hosts · notificationways · realms · servicegroups · services · timeperiods....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found