Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Error resolving babel modules #38

Open
nicoladj77 opened this issue May 20, 2020 · 0 comments
Open

Error resolving babel modules #38

nicoladj77 opened this issue May 20, 2020 · 0 comments

Comments

@nicoladj77
Copy link

Describe the bug
There is an error which prevents the module from compiling. I'm using this with the 10up theme scaffold

To Reproduce
Steps to reproduce the behavior:

  1. install the module with npm
  2. include the module in javascript
    import CountdownTimer from '@10up/countdown-timer';

new CountdownTimer('.countdown-timer', {
// Settings and callback properties go here.
});

  1. compile js and get the error.

ERROR in /Users/nicola/node_modules/@10up/countdown-timer/src/countdown-timer.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/defineProperty' in '/Users/nicola/node_modules/@10up/countdown-timer/src'
resolve '@babel/runtime/helpers/defineProperty' in '/Users/nicola/node_modules/@10up/countdown-timer/src'
Parsed request is a module
using description file: /Users/nicola/node_modules/@10up/countdown-timer/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/Users/nicola/node_modules/@10up/countdown-timer/src/node_modules doesn't exist or is not a directory
/Users/nicola/node_modules/@10up/countdown-timer/node_modules doesn't exist or is not a directory
/Users/nicola/node_modules/@10up/node_modules doesn't exist or is not a directory
/Users/nicola/node_modules/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Users/nicola/node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.json doesn't exist
as directory
/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty doesn't exist
[/Users/nicola/node_modules/@10up/countdown-timer/src/node_modules]
[/Users/nicola/node_modules/@10up/countdown-timer/node_modules]
[/Users/nicola/node_modules/@10up/node_modules]
[/Users/nicola/node_modules/node_modules]
[/Users/node_modules]
[/node_modules]
[/Users/nicola/node_modules/package.json]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty/package.json]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.wasm]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.mjs]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.js]
[/Users/nicola/node_modules/@babel/runtime/helpers/defineProperty.json]
@ /Users/nicola/node_modules/@10up/countdown-timer/src/countdown-timer.js 14:0-68 21:262-277
@ ./assets/js/frontend/components/countdown.js
@ ./assets/js/frontend/frontend.js

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Mobile (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Please list more relevant information here.

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

No branches or pull requests

1 participant