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

process.env.NODE_PATH is undefined in webpack.config.prod.js #80

Open
Southgarden116 opened this issue Sep 17, 2018 · 2 comments
Open

Comments

@Southgarden116
Copy link

I just upgraded from optimize-css-assets-webpack-plugin 4.0.0 to 5.0.1 because of my z-index issue with cssnano.
However, in my webpack.config.prod.js file I get the following error when I call yarn build:

process.env.NODE_PATH.split(path.delimiter).filter(Boolean)

TypeError: Cannot read property 'split' of undefined
    at Object.<anonymous> (C:\Users\winbuild\Development\myApp\config\webpack.config.prod.js:108:28)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\winbuild\Development\myApp\scripts\build.js:21:16)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at startup (bootstrap_node.js:158:16)
error Command failed with exit code 1.

Somehow the process.env.NODE_PATH becomes undefined.
It works fine when I downgrade back to 4.0.0.

@Fl4v10
Copy link

Fl4v10 commented Nov 22, 2018

I got the same error, someone please.

yarn build
yarn run v1.7.0
$ react-scripts build
C:\codes\signage\node_modules\react-scripts\config\webpack.config.prod.js:222
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
^

TypeError: Cannot read property 'split' of undefined
    at Object.<anonymous> (C:\codes\signage\node_modules\react-scripts\config\webpack.config.prod.js:222:29)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\codes\signage\node_modules\react-scripts\scripts\build.js:39:16)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@tapioko
Copy link

tapioko commented Dec 4, 2018

Maybe related:
jaredpalmer/razzle#287
jaredpalmer/razzle@b3916f0

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

3 participants