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.

[BUG] AdminLTE fails to install with yarn and custom folder

See original GitHub issue

To Reproduce

  1. create a .yarnrc file with a custom --modules-folder
  2. run yarn-add admin-lte

Expected behavior The package should install

Screenshots

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

Error: Cannot find module 'fs-extra'
Require stack:
- /home/felipe/projects/colplan/public/assets/admin-lte/build/npm/Publish.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/felipe/projects/colplan/public/assets/admin-lte/build/npm/Publish.js:2:17)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/felipe/projects/colplan/public/assets/admin-lte/build/npm/Publish.js'
  ]
}

Environment (please complete the following information):

  • AdminLTE Version: v3.0.2
  • Operating System: Ubuntu 19.10

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
FelipeEmerimcommented, Jun 17, 2020

I solved it by adding these two settings in my .yarnrc file pointing to my custom directory. Note that the paths have to be absolute.

# ./.yarnrc
--*.modules-folder /app/public/assets
env:
  NODE_PATH "/app/public/assets"
0reactions
FelipeEmerimcommented, Jun 19, 2020

@juniwalk Me neither, but it is the only way I got it working. It seems to be a problem with yarn as mentioned above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve Nodejs: Error: ENOENT: no such file or directory
Now I'm trying to setup a local copy on my Development server. I currently have Nodejs, NPM and Mongo Installed just like what...
Read more >
Creating Plugins - Vemto
Plugins are, in essence, node.js packages and therefore support installing third-party modules usually with npm install or yarn install. However, be careful ...
Read more >
Dependencies & Plugins | AdminLTE 3 Documentation
AdminLTE depends on two main frameworks. The downloadable package contains both of these libraries, so you don't have to manually download them. Bootstrap...
Read more >
Integrate AndminLTE with Ruby On Rails 6
Using npm to install yarn # You may have to run this command ... First you have to move to the app directory...
Read more >
Unable to locate Mix file: /js/app.js. - Laracasts
When i'm deploying my site to Laravel Forge, it give me an error saying "Unable to locate Mix file" . locally is fully...
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