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

Error: Cannot find module 'core-js/modules/es.symbol.description.js' #267

Open
finnlewis opened this issue May 3, 2023 · 11 comments
Open

Comments

@finnlewis
Copy link

Describe the bug

Sorry if I'm missing something obvious, but I am just trying to set up a Drupal wingsuit theme and I'm seeing the same error whichever way I go.

Error: Cannot find module 'core-js/modules/es.symbol.description.js'

To Reproduce

Looking at https://github.com/wingsuit-designsystem/wingsuit#quickstart

I've got a Drupal site installed.

cd themes/custom
npx @wingsuit-designsystem/cli init

And this is what I get:


$ npx @wingsuit-designsystem/cli init
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'core-js/modules/es.symbol.description.js'
Require stack:
- /home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js
- /home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/bin/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js',
    '/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/bin/index.js'
  ]
}

To Reproduce the BLT route

Also, following the https://github.com/wingsuit-designsystem/wingsuit-kickstarter route:

When I get to:

 ./vendor/bin/blt setup

I get a similar error:

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'core-js/modules/es.symbol.description.js'
Require stack:
- /home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js
- /home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/bin/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/dist/cli.js',
    '/home/finn/.npm/_npx/0509b4e64139b452/node_modules/@wingsuit-designsystem/cli/bin/index.js'
  ]
}
sh: 1: cd: can't cd to wingsuit
 [ExecStack]  Exit code 2  Time 2.293s
 [error]  Executing target-hook frontend-reqs failed.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 
The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.
 [error]  Command `source:build:frontend-reqs ` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 
The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.
 [error]  Command `source:build:frontend ` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 
The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.
 [error]  Command `source:build ` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/ 
**Expected behavior**
Not sure, I'm just trying to set it up and test.

**Desktop (please complete the following information):**

- Ubuntu 22.04
- PHP 8.1.7
- Node v16.13.0
- yarn 1.22.19
- npx 8.1.0


Any help or suggestions gratefully received!

@blackbart420
Copy link

Same problem here on a new drupal 10 website.

  • Ubuntu 22.04
  • PHP 8.1
  • Node v14 (also tried with node 12 and 16)
  • yarn 1.22

@blackbart420
Copy link

@finnlewis I could get it working by forcing the installation with the version 1.2.7 of wingsuit (and node v14):

npx @wingsuit-designsystem/[email protected] init -k tailwind

@christianwiedemann
Copy link
Contributor

Hm strange. It works for me. The package "core-js" is somehow missing. Will check it.

@christianwiedemann
Copy link
Contributor

Can you try npx @wingsuit-designsystem/cli init --branch master

@blackbart420
Copy link

@christianwiedemann I just tried it but I got the same error

@bowiechang
Copy link

Thanks @christianwiedemann, I've tried npx @wingsuit-designsystem/cli init --branch master and gotten the same error, watching this issue.

@christianwiedemann
Copy link
Contributor

I released 1.2.8 with core-js included in wingsuit/core. Give it a try.

@blackbart420
Copy link

Thank you very much @christianwiedemann ! The error is gone :)

@finnlewis
Copy link
Author

Just to confirm, I can now install with

npx @wingsuit-designsystem/[email protected] init

Thanks @christianwiedemann !

@finnlewis
Copy link
Author

However, it the error persists when not specifying a version.

npx @wingsuit-designsystem/cli init

Which then means the BLT route still does not work.

@finnlewis finnlewis reopened this May 12, 2023
@finnlewis
Copy link
Author

So this is what worked for me in Drupal in the end, for the 1.x branch.

Fresh install of Drupal 9.

composer require 'drupal/wingsuit_companion:^2.1'
composer require 'drupal/ui_patterns:^1.5'
composer require 'drupal/components:^2.4'

drush en components wingsuit_companion wingsuit_ui_patterns
cd themes/custom
nvm use 16
npx @wingsuit-designsystem/[email protected] init -k tailwind 

This fires up Storybook on completion.

ctrl C (^C) to get out of that

Build the Drupal theme assets with:

cd wingsuit
yarn dev:drupal

In Drupal, edit the dist path at /admin/wingsuit-companion/form/config and set to:

themes/custom/wingsuit/dist/app-drupal

At /admin/appearance, install wingsuit theme then set to default.

Clear the cache

I can now see various components on the Drupal theme, not laid out particularly well, but it's a start!

image

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

4 participants