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.

Zeit `now` deploys fail after version 0.7.0.

See original GitHub issue

I’m not sure if this is related to now, but since upgrading react-scripts to anything above 0.7.0, my build is now failing on the now deployment.

Here are the logs:

> ▲ npm run build
>
>   - index.js:47 Compiler.<anonymous>
>     [src]/[b6a523076d54485fee7b51e624a717feb64ba053]/index.js:47:40
>
> Error Error: Command react-scripts build ended with code 1
>     at ChildProcess.<anonymous> (/usr/lib/node_modules/@zeit/ace/build/lib/run.js:1:599)
>     at emitTwo (events.js:106:13)
>     at ChildProcess.emit (events.js:191:7)
>     at maybeClose (internal/child_process.js:877:16)
>     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

And the webpack file error that’s being served:

TypeError: Cannot read property '0' of undefined
  
  - ExternalModuleFactoryPlugin.js:18 ExternalModuleFactoryPlugin.
    [src]/[6b8981c7f0f59e57253f8dd5b1728ea3f444414d]/lib/ExternalModuleFactoryPl    ugin.js:18:38
  
  - NormalModuleFactory.js:159 
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/NormalModuleFactory.js:    159:3
  
  - Tapable.js:75 NormalModuleFactory.applyPluginsAsyncWaterfall
    [src]/[83d7d57e3d1ba8fe04c1aff2eddd6e9eb2c9743c]/lib/Tapable.js:75:69
  
  - NormalModuleFactory.js:144 NormalModuleFactory.create
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/NormalModuleFactory.js:    144:8
  
  - Compilation.js:356 Compilation.process [as _addModuleChain]
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/Compilation.js:356:16
  
  - Compilation.js:424 Compilation.process [as addEntry]
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/Compilation.js:424:7
  
  - SingleEntryPlugin.js:22 SingleEntryPlugin.
    [src]/[6b8981c7f0f59e57253f8dd5b1728ea3f444414d]/lib/SingleEntryPlugin.js:22    :15
  
  - Tapable.js:107 Compiler.applyPluginsParallel
    [src]/[83d7d57e3d1ba8fe04c1aff2eddd6e9eb2c9743c]/lib/Tapable.js:107:14
  
  - Compiler.js:394 Compiler.compile
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/Compiler.js:394:7
  
  - Compiler.js:203 Compiler.runAsChild
    [src]/[0a79c0ca287eb47d24f1da61b5f91b43ad6b29d8]/lib/Compiler.js:203:7
  
  - compiler.js:70 
    [src]/[b6a523076d54485fee7b51e624a717feb64ba053]/lib/compiler.js:70:19
  
  - debuggability.js:299 Promise._execute
    [src]/[953ea8d4badc1212d26071638946cd40c7f53f6b]/js/release/debuggability.js    :299:9
  
  - promise.js:481 Promise._resolveFromExecutor
    [src]/[953ea8d4badc1212d26071638946cd40c7f53f6b]/js/release/promise.js:481:1    8
  
  - promise.js:77 new Promise
    [src]/[953ea8d4badc1212d26071638946cd40c7f53f6b]/js/release/promise.js:77:14  
  - compiler.js:69 Object.compileTemplate
    [src]/[b6a523076d54485fee7b51e624a717feb64ba053]/lib/compiler.js:69:10
  
  - index.js:47 Compiler.
    [src]/[b6a523076d54485fee7b51e624a717feb64ba053]/index.js:47:40

These are as good of logs I can get right now unless there’s a more verbose logging in react-scripts build.

This may be a Zeit now issue, but the fact that it worked prior to 0.8.x makes me want to bring it up here.

Environment

  1. npm ls react-scripts (if you haven’t ejected): react-scripts@0.8.1
  2. node -v: v7.1.0 or v7.0.0
  3. npm -v: 3.10.9
  4. yarn --version: 0.17.4
  5. now --version: 𝚫 now 0.35.0
  6. package.json: (note “list” and “now-start”)
{
  "name": "example",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-scripts": "0.8.1"
  },
  "dependencies": {
    "list": "^0.9.0",
    "react": "^15.4.1",
    "react-dom": "^15.4.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "now-start": "list ./build --single"
  }
}

How to reproduce

$ create-react-app example
$ yarn add list
$ ... add "now-start": "list ./build --single" to scripts
$ cd example
$ now

Now to make it actually work

$ yarn upgrade react-scripts@0.7.0
$ now

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
jamocommented, Dec 14, 2016

Apologies for the delay with the fix, the underlying issue in now has been fixed and react-create-apps seems to be building properly in now

Demo/poc app here: https://react-create-app-demo-zqahqhmybz.now.sh/ and src here: https://react-create-app-demo-zqahqhmybz.now.sh/_src/?f=package.json

1reaction
vidarccommented, Apr 8, 2017

Just started to get this issue, however I do not use now.sh. Both yarn build/start and npm run build/start produce the same error. Downgrading to 0.7.0 fixes the issue. I tried 0.8.0, and that gave me the same error. Only thing I did between a working build and a non-working build was to add css-loader and style-loader to my dev-dependencies for my server code, which I have since removed, but the error remains.

Tried all the normal stuff, deleted node_modules and the yarn cache. Unsure of what to try next.

EDIT: just tried downgrading to webpack 1 for my server code. Was then able to upgrade back to latest react-scripts and everything worked. Then went ahead and upgraded to latest webpack 2, and everything still works. So… ¯\_(ツ)_/¯

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app build on now fails · Issue #160 - GitHub
I'm getting the following error: > △ npm run now-build > > - index.js:47 Compiler. ... Zeit now deploys fail after version 0.7.0....
Read more >
Release Notes - FastAPI
You can start with Python Types Intro, it explains what changes between different Python versions, in Python 3.9 and in Python 3.10. All...
Read more >
Errors – Vercel Docs
When the deployment for a commit fails with the message "Team access required to deploy.", the Git account of the commit author is...
Read more >
Changelog - Cypress Documentation
Bugfixes: Fixed an issue with the cy.session command where it now recollects the session data after validation is successful to correctly store the...
Read more >
0 - Stack Overflow
Im trying for the first time to set up a debian server (with puma, nginx, postgres sql and debian 10, a vps from...
Read more >

github_iconTop Related Medium Post

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