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.

Preview server error since 0.7.2 in yarn workspace

See original GitHub issue

Have tried to update to mailing@^0.7.2 and unfortunately I’m getting this error when attempting to run mailing preview.

Server Error
Error: Cannot find module 'http'

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
webpackEmptyContext
file:///Users/willviles/Code/@Redbrain/packages/email/.mailing/.next/server/pages/index.js (22:10)
../../node_modules/axios/lib/adapters/http.js
webpack-internal:///./src/moduleManifest.js (1924:20)
__require2
webpack-internal:///./src/moduleManifest.js (34:56)
getDefaultAdapter
webpack-internal:///./src/moduleManifest.js (2240:27)
../../node_modules/axios/lib/defaults/index.js
webpack-internal:///./src/moduleManifest.js (2259:22)
__require2
webpack-internal:///./src/moduleManifest.js (34:56)
../../node_modules/axios/lib/core/transformData.js
webpack-internal:///./src/moduleManifest.js (2338:24)
__require2
webpack-internal:///./src/moduleManifest.js (34:56)
../../node_modules/axios/lib/core/dispatchRequest.js
webpack-internal:///./src/moduleManifest.js (2362:29)
__require2
webpack-internal:///./src/moduleManifest.js (34:56)

There are no errors in a vanilla project, however I’m using Mailing within a yarn workspace, which already contains a next.js app.

Pinning to mailing@0.7.1 and adding a the following nohoist rules to my root package.json ensures the error disappears:

{
  "workspaces": {
    "nohoist": [
      "**/mailing",
      "**/mailing-core"
    ]
  }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

2reactions
willvilescommented, Sep 9, 2022

Wow, you guys are fast!

Can confirm that 0.7.5-next.0 is working perfectly in my real world monorepo.

Thank you @alexfarrill @psugihara for such a speedy fix 👍

2reactions
alexfarrillcommented, Sep 8, 2022

@willviles @psugihara think I have a solution here, will post a beta to test here soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - yarn workspace triggers errors in a different package
I was able to run yarn workspace @project/web dev (Next.js) application after some tweaking with tsconfig and resolution.
Read more >
vue-tsc | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
1.1.7 (core) / 0.17.7 (libraries) - Dagster Docs
Fixed an issue with storage implementations using MySQL server version 5.6 which caused SQL syntax exceptions to surface when rendering the Instance overview ......
Read more >
Changelog - Cypress Documentation
After creating the spec, you can preview the spec that was generated with the option to ... We have observed errors with Yarn...
Read more >
Windows Analysis Report node-v16.13.2-x64.msi - Joe Sandbox
Preview: #!/usr/bin/env pwsh. ... C:\Program Files\nodejs\node_modules\corepack\shims\nodewin\yarn.ps1 ... 'remote error: Internal Server Error',.
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