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

'merge-anything' does not provide an export named 'mergeAndConcat' #9

Closed
potatopotaro opened this issue Apr 8, 2021 · 5 comments
Closed

Comments

@potatopotaro
Copy link

NOTE: This issue is a repost from the new solid-start repo. I came across it when using the solid-start package(s).

Describe the bug
The dev server successfully opens a new tab with the default address/port (http://localhost:3000/ in this case), however, it almost immediately crashes with the following error:

Taros-MBP:<DIR_NAME> potatopotaro$ pnpm run dev -- --open

> <DIR_NAME>@ dev /Users/potatopotaro/Documents/projects/<DIR_NAME>
> solid-start dev "--open"

failed to load config from /Users/potatopotaro/Documents/projects/<DIR_NAME>/vite.config.js
(node:1533) UnhandledPromiseRejectionWarning: file:///Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/[email protected]/node_modules/vite-plugin-solid/dist/esm/index.mjs:5
import { mergeAndConcat } from 'merge-anything';
         ^^^^^^^^^^^^^^
SyntaxError: The requested module 'merge-anything' does not provide an export named 'mergeAndConcat'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
    at async Loader.import (internal/modules/esm/loader.js:179:24)
    at async importModuleDynamicallyWrapper (internal/vm/module.js:432:15)
    at async loadConfigFromFile (/Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-6e02b235.js:46235:31)
    at async resolveConfig (/Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-6e02b235.js:45889:28)
    at async Object.createServer (/Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-6e02b235.js:69129:20)
    at async createServer (file:///Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/[email protected]_db9a126b6b31f1a7a79b257c7dace278/node_modules/solid-start/runtime/devServer.js:10:18)

To Reproduce

  1. Install/initialize a fresh project using npm init solid@next
  2. Run the dev server with pnpm run dev (occurs with the use of npm and -- --open arg as well)
  3. Notice a tab is opened, prefilled with the default localhost + port
  4. Also notice how the dev command/script crashes with the above error.

Expected behavior
The dev script successfully/continuously runs until stopped by the developer.

@potatopotaro
Copy link
Author

potatopotaro commented Apr 8, 2021

Reposted from: ryansolid/solid-start/issues/1

@amoutonbrady
Copy link
Member

Hi, thanks for reporting. This repo is definitely the root of your issue.

At first glance I don't seem to reproduce your issue. From your file system, I'm grasping that you use a Unix system, probably mac, right?

Could you provide me with a little more context? Node version, npm, pnpm version? Can you rety see if the bug has magically disappeared?

Here's a video of my local reproduction:

Peek.2021-04-09.22-17.mp4

@amoutonbrady
Copy link
Member

I bundled this dependency right into the plugin, this should fix the issue. Available in 1.5.1.

@potatopotaro
Copy link
Author

I can confirm that your update fixed my issue, however, it reappeared (a named export from @babel/core). After learning more about Node.js's adoption of modules, etc. I updated my Node.js version from v14.2.0 to v14.16.1, which resolved the named export error; your instinct to ask about my environment was spot on. For future users, it may be wise to list a minimum required node version in the readme. Thanks for all that you and Ryan do for us Solid.js devs. Cheers.

@amoutonbrady
Copy link
Member

Ah awesome to hear and thanks for the nice comments! I'll add a note about the required version of node. Feel free to open further issues if you bump into something else. I use this plugin on very basic setup myself and don't have much more real life examples out there than the HN news example and the real world example demo app 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants