[Bug] Build is failing due to Babel
See original GitHub issue‘yarn start’ works ‘yarn build’ fails
` Error: Trace: { code: ‘MODULE_NOT_FOUND’ } at init.catch.e (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\bin\react- static:6:11) at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Cannot find module ‘F:\OneDrive\Web Development\Development Work\TypeScript\my-static -site\artifacts\static-app.js’
- loader.js:636 Function.Module._resolveFilename`
even more
ERROR in F:/OneDrive/Web Development/Development Work/TypeScript/my-static-site/artifacts/react-static-templates.js Module build failed (from ./babel-loader/lib/index.js): TypeError: Property value expected type of string but got null at Object.validate (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\types\lib\definitions\utils.js:164:13) at validateField (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\types\lib\validators\validate.js:22:9) at validate (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\types\lib\validators\validate.js:16:3) at builder (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\types\lib\builders\builder.js:46:27) at Object.StringLiteral (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\types\lib\builders\generated\index.js:337:31) at idOption (F:\OneDrive\Web Development\Development Work\TypeScript\my-static-site\node_modules\babel-plugin-universal-import\index.js:134:49) at PluginPass.Import (F:\OneDrive\Web Development\Development Work\TypeScript\my-static-site\node_modules\babel-plugin-universal-import\index.js:241:13) at newFn (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\traverse\lib\visitors.js:195:21) at NodePath._call (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\traverse\lib\path\context.js:53:20) at NodePath.call (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\traverse\lib\path\context.js:40:17) at NodePath.visit (C:\Users\robih\AppData\Roaming\npm\node_modules\react-static\node_modules\@babel\traverse\lib\path\context.js:88:12)
i have tried removing yarn.lock, ‘yarn’, ‘yarn upgrade’, ‘yarn upgrade react-static’
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Thanks bud! Yes I used both basic and the typescript template (react-static-typescript-plugin), I came across your comment yesterday…
if it helps I am on react-static v7.2.2 but the package.json says ^7.2.0 (i think the caret upgrades to latest minor version)
when i use --debug i get warnings and then a final error about babel
Same as https://github.com/react-static/react-static/issues/1307#issuecomment-532696446, I think there is a bug in the
basic
template. Is that the one you used? If that’s the case, I’ll try to reproduce and fix 😃