wingsuit icon indicating copy to clipboard operation
wingsuit copied to clipboard

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

Open finnlewis opened this issue 2 years ago • 11 comments

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!

finnlewis avatar May 03 '23 22:05 finnlewis

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 avatar May 09 '23 15:05 blackbart420

@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

blackbart420 avatar May 10 '23 10:05 blackbart420

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

christianwiedemann avatar May 10 '23 21:05 christianwiedemann

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

christianwiedemann avatar May 10 '23 21:05 christianwiedemann

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

blackbart420 avatar May 10 '23 23:05 blackbart420

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

bowiechang avatar May 11 '23 07:05 bowiechang

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

christianwiedemann avatar May 11 '23 17:05 christianwiedemann

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

blackbart420 avatar May 11 '23 20:05 blackbart420

Just to confirm, I can now install with

npx @wingsuit-designsystem/[email protected] init

Thanks @christianwiedemann !

finnlewis avatar May 12 '23 12:05 finnlewis

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 avatar May 12 '23 12:05 finnlewis

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

finnlewis avatar May 22 '23 11:05 finnlewis