Strapi develop command failed

I got the same error, and after a lot of trial and error i figured out it happens when strapi is nested within an existing Node project that also uses babel/webpack (in my case a Next.js project).

nextjs-project/strapi 
❯ npm run build

> strapi@0.1.0 build
> strapi build

Building your admin UI with development configuration ...

✖ Webpack
  Compiled with some errors in 8.49s

Error: ./.cache/plugins/strapi-plugin-content-manager/admin/src/components/RepeatableComponent/Banner.js 2:87
...

nextjs-project/strapi 
❯ cd ..

nextjs-project  
❯ mv strapi ../

nextjs-project 
❯ cd ../strapi

Projects/badsyntax/strapi 
❯ npm run build

> strapi@0.1.0 build
> strapi build

Building your admin UI with development configuration ...

✔ Webpack
  Compiled successfully in 11.56s

@DMehaffy can you try replicate this issue by bootstrapping a next.js project then bootstrapping a strapi project nested within the nextjs project?

1 Like