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' #1

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

Comments

@potatopotaro
Copy link

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/vite-plugin-solid@1.5.0/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/vite@2.1.4/node_modules/vite/dist/node/chunks/dep-6e02b235.js:46235:31)
    at async resolveConfig (/Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/vite@2.1.4/node_modules/vite/dist/node/chunks/dep-6e02b235.js:45889:28)
    at async Object.createServer (/Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/vite@2.1.4/node_modules/vite/dist/node/chunks/dep-6e02b235.js:69129:20)
    at async createServer (file:///Users/potatopotaro/Documents/projects/<DIR_NAME>/node_modules/.pnpm/solid-start@0.1.0-alpha.13_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.

Additional context
My gut says this is a problem on my end, as you would've likely caught the error already, otherwise. I'll update this issue with the solution if I find it.

@potatopotaro
Copy link
Author

This was resolved in the vite-plugin-solid repo. Additionally, this was likely user/dev error on my behalf. Updating my version of Node.js from v14.2.0 to v14.16.1 fixed a similar issue (another named export error). This is likely due to Node.js's semi-recent/maturing adoption of modules. It may be wise to list a minimum required node version in the readme. Cheers.

@uma-uc
Copy link

uma-uc commented Feb 20, 2022

I am still having this issue - node version v14.18.2.

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