question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are you reporting a bug?

Yes, maybe related to my environment

Problem description

The CLI command start returns an error on a newly created project.

MacBook-Pro-di-Matteo:rstatic6 matteo$ yarn start
yarn run v1.12.3
$ react-static start
  Error: Cannot find module 'react-static/babel-preset.js' from '/Users/matteo/D  ocuments/Development/rstatic6'
  
  - sync.js:43 Function.module.exports [as sync]
    [rstatic6]/[resolve]/lib/sync.js:43:15
  
  - plugins.js:101 resolveStandardizedName
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:101:31
  
  - plugins.js:58 resolvePreset
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:58:10
  
  - plugins.js:77 loadPreset
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:77:20
  
  - config-descriptors.js:154 createDescriptor
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:154:9
  
  - config-descriptors.js:109 items.map
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:109:50
  
  - Array.map
  
  - config-descriptors.js:109 createDescriptors
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:109:29
  
  - config-descriptors.js:101 createPresetDescriptors
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:101:10
  
  - config-descriptors.js:47 presets
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:47:19
  
  - config-chain.js:320 mergeChainOpts
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:320:26
  
  - config-chain.js:283 
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:283:7
  
  - config-chain.js:120 buildRootChain
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:120:22
  
  - partial.js:85 loadPrivatePartialConfig
    [rstatic6]/[@babel]/core/lib/config/partial.js:85:55
  
  - full.js:43 loadFullConfig
    [rstatic6]/[@babel]/core/lib/config/full.js:43:39
  
  - index.js:27 loadOptions
    [rstatic6]/[@babel]/core/lib/config/index.js:27:36
  
  - index.js:231 OptionManager.init
    [rstatic6]/[@babel]/core/lib/index.js:231:36
  
  - node.js:61 compile
    [rstatic6]/[@babel]/register/lib/node.js:61:42
  
  - node.js:102 compileHook
    [rstatic6]/[@babel]/register/lib/node.js:102:12
  
  - index.js:77 Module._compile
    [rstatic6]/[pirates]/lib/index.js:77:29
  
  - loader.js:700 Module._extensions..js
    internal/modules/cjs/loader.js:700:10
  
  - index.js:88 Object.newLoader [as .js]
    [rstatic6]/[pirates]/lib/index.js:88:7
  
  - loader.js:599 Module.load
    internal/modules/cjs/loader.js:599:32
  
  - loader.js:538 tryModuleLoad
    internal/modules/cjs/loader.js:538:12
  
  - loader.js:530 Function.Module._load
    internal/modules/cjs/loader.js:530:3
  
  - loader.js:637 Module.require
    internal/modules/cjs/loader.js:637:17
  
  - helpers.js:20 require
    internal/modules/cjs/helpers.js:20:18
  
  - getConfig.js:328 _callee3$
    [rstatic6]/[react-static]/lib/static/getConfig.js:328:22
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - getConfig.js:46 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/static/getConfig.js:46:103
  
  - getConfig.js:48 _next
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:194
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:364
  
  - new Promise
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:97
  
  - getConfig.js:346 buildConfigFromPath
    [rstatic6]/[react-static]/lib/static/getConfig.js:346:18
  
  - getConfig.js:368 _callee5$
    [rstatic6]/[react-static]/lib/static/getConfig.js:368:20
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - getConfig.js:46 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/static/getConfig.js:46:103
  
  - getConfig.js:48 _next
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:194
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:364
  
  - new Promise
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:97
  
  - getConfig.js:417 getConfig
    [rstatic6]/[react-static]/lib/static/getConfig.js:417:23
  
  - start.js:62 Object._callee3$
    [rstatic6]/[react-static]/lib/commands/start.js:62:42
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  

  Error: Cannot find module 'react-static/babel-preset.js' from '/Users/matteo/D  ocuments/Development/rstatic6'
  
  - sync.js:43 Function.module.exports [as sync]
    [rstatic6]/[resolve]/lib/sync.js:43:15
  
  - plugins.js:101 resolveStandardizedName
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:101:31
  
  - plugins.js:58 resolvePreset
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:58:10
  
  - plugins.js:77 loadPreset
    [rstatic6]/[@babel]/core/lib/config/files/plugins.js:77:20
  
  - config-descriptors.js:154 createDescriptor
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:154:9
  
  - config-descriptors.js:109 items.map
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:109:50
  
  - Array.map
  
  - config-descriptors.js:109 createDescriptors
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:109:29
  
  - config-descriptors.js:101 createPresetDescriptors
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:101:10
  
  - config-descriptors.js:47 presets
    [rstatic6]/[@babel]/core/lib/config/config-descriptors.js:47:19
  
  - config-chain.js:320 mergeChainOpts
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:320:26
  
  - config-chain.js:283 
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:283:7
  
  - config-chain.js:120 buildRootChain
    [rstatic6]/[@babel]/core/lib/config/config-chain.js:120:22
  
  - partial.js:85 loadPrivatePartialConfig
    [rstatic6]/[@babel]/core/lib/config/partial.js:85:55
  
  - full.js:43 loadFullConfig
    [rstatic6]/[@babel]/core/lib/config/full.js:43:39
  
  - index.js:27 loadOptions
    [rstatic6]/[@babel]/core/lib/config/index.js:27:36
  
  - index.js:231 OptionManager.init
    [rstatic6]/[@babel]/core/lib/index.js:231:36
  
  - node.js:61 compile
    [rstatic6]/[@babel]/register/lib/node.js:61:42
  
  - node.js:102 compileHook
    [rstatic6]/[@babel]/register/lib/node.js:102:12
  
  - index.js:77 Module._compile
    [rstatic6]/[pirates]/lib/index.js:77:29
  
  - loader.js:700 Module._extensions..js
    internal/modules/cjs/loader.js:700:10
  
  - index.js:88 Object.newLoader [as .js]
    [rstatic6]/[pirates]/lib/index.js:88:7
  
  - loader.js:599 Module.load
    internal/modules/cjs/loader.js:599:32
  
  - loader.js:538 tryModuleLoad
    internal/modules/cjs/loader.js:538:12
  
  - loader.js:530 Function.Module._load
    internal/modules/cjs/loader.js:530:3
  
  - loader.js:637 Module.require
    internal/modules/cjs/loader.js:637:17
  
  - helpers.js:20 require
    internal/modules/cjs/helpers.js:20:18
  
  - getConfig.js:328 _callee3$
    [rstatic6]/[react-static]/lib/static/getConfig.js:328:22
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - getConfig.js:46 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/static/getConfig.js:46:103
  
  - getConfig.js:48 _next
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:194
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:364
  
  - new Promise
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:97
  
  - getConfig.js:346 buildConfigFromPath
    [rstatic6]/[react-static]/lib/static/getConfig.js:346:18
  
  - getConfig.js:390 FSWatcher._callee4$
    [rstatic6]/[react-static]/lib/static/getConfig.js:390:32
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - getConfig.js:46 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/static/getConfig.js:46:103
  
  - getConfig.js:48 _next
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:194
  
  - getConfig.js:48 
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:364
  
  - new Promise
  
  - getConfig.js:48 FSWatcher.<anonymous>
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:97
  
  - events.js:182 FSWatcher.emit
    events.js:182:13
  
  - index.js:200 FSWatcher.<anonymous>
    [rstatic6]/[chokidar]/index.js:200:38
  
  - index.js:241 FSWatcher._emit
    [rstatic6]/[chokidar]/index.js:241:5
  
  - fsevents-handler.js:329 FSWatcher.<anonymous>
    [rstatic6]/[chokidar]/lib/fsevents-handler.js:329:12
  
  - fsevents-handler.js:378 FSWatcher.<anonymous>
    [rstatic6]/[chokidar]/lib/fsevents-handler.js:378:7
  

  TypeError: Cannot read property 'DIST' of undefined
  
  - start.js:85 _callee2$
    [rstatic6]/[react-static]/lib/commands/start.js:85:69
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - start.js:24 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/commands/start.js:24:103
  
  - start.js:26 _next
    [rstatic6]/[react-static]/lib/commands/start.js:26:194
  
  - start.js:26 
    [rstatic6]/[react-static]/lib/commands/start.js:26:364
  
  - new Promise
  
  - start.js:26 
    [rstatic6]/[react-static]/lib/commands/start.js:26:97
  
  - start.js:160 
    [rstatic6]/[react-static]/lib/commands/start.js:160:30
  
  - getConfig.js:394 FSWatcher._callee4$
    [rstatic6]/[react-static]/lib/static/getConfig.js:394:42
  
  - runtime.js:62 tryCatch
    [rstatic6]/[regenerator-runtime]/runtime.js:62:40
  
  - runtime.js:288 Generator.invoke [as _invoke]
    [rstatic6]/[regenerator-runtime]/runtime.js:288:22
  
  - runtime.js:114 Generator.prototype.(anonymous function) [as next]
    [rstatic6]/[regenerator-runtime]/runtime.js:114:21
  
  - getConfig.js:46 asyncGeneratorStep
    [rstatic6]/[react-static]/lib/static/getConfig.js:46:103
  
  - getConfig.js:48 _next
    [rstatic6]/[react-static]/lib/static/getConfig.js:48:194
  
  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7

Environment

  1. react-static -V: 6.0.18
  2. node -v: 10.9.0
  3. npm -v: 6.5.0; 3b. yarn -v: 1.12.3;
  4. Operating system: MacOs Mojave (10.14.1)
  5. Browser and version (if relevant): -

Steps to Reproduce the problem

  • Just upgraded react-static to v6
  • I created a new project (basic template)
  • I tried to start it.

I’m almost sure it is bound to my environment, otherwise you would have already spotted it, but I cannot understand what could it be.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nozzlecommented, Dec 30, 2018

This should be fixed in the latest release

0reactions
efleurinecommented, Jan 26, 2019

Hi everyone,

just to let you know

I just got this error with a fresh global installation of react-static with both stress & typescript template.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error while running npm start in the cli - Stack Overflow
The project is made using create-react-app but when I am trying to execute the start scripts, getting mentioned error "npm ERR! missing ......
Read more >
Astro dev start error - Astronomer Forum
I'm following the certification preparation course. Running astro dev start results in this error: Env file ".env" found.
Read more >
Troubleshooting Your Setup | BigCommerce Dev Center
If you get an unexpected error message or unexpected results upon executing the stencil init , stencil start , or other Stencil CLI...
Read more >
Troubleshooting AWS CLI errors - AWS Command Line Interface
This error means that the operating system can't find the AWS CLI command. The installation might be incomplete or requires updating. ... Example...
Read more >
error AggregateException The NPM script 'start' exited without ...
(The NPM script 'start' exited without indicating that the Angular CLI was listening for requests. The error output was: Error: EPERM: operation ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found