Closed ppKrauss closed 2 years ago
Atualizando: ao rodar em uma pasta sem risco de permisóes (git clone em /tmp
ou /home/myUser/sandbox
), o comando npm run build
continuou fornecendo o mesmo erro, "Module not found: Error: Can't resolve './pages/home' in '/tmp/site-v2/src".
A sugestão é que os desenvolvedores revisem a aplicação ReactJS do git rodando em um ambiente totalmente LTS, ou seja, com mas versões Node e Npm conforme indicadas no inicio da issue, que por sua vez cumprem com as diretivas do suporte,
Bugs ainda se usando versão "limpa", de https://github.com/elpbatista/peter-test
git clone https://github.com/elpbatista/peter-test.git
Cloning into 'peter-test'...
remote: Enumerating objects: 258, done.
remote: Counting objects: 100% (258/258), done.
remote: Compressing objects: 100% (211/211), done.
remote: Total 258 (delta 67), reused 229 (delta 38), pack-reused 0
Receiving objects: 100% (258/258), 4.47 MiB | 33.15 MiB/s, done.
Resolving deltas: 100% (67/67), done.
pk@ubuntu20:~/sandbox$ cd peter-test/
pk@ubuntu20:~/sandbox/peter-test$ npm install
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated puppeteer@1.20.0: Version no longer supported. Upgrade to @latest
added 1537 packages, and audited 1538 packages in 13s
193 packages are looking for funding
run `npm fund` for details
14 vulnerabilities (1 moderate, 12 high, 1 critical)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
pk@ubuntu20:~/sandbox/peter-test$ npm run build
> site-v2@0.1.0 build
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
163.78 kB build/static/js/main.d734fbde.js
2.54 kB build/static/css/main.241a24a2.css
1.78 kB build/static/js/787.222f8364.chunk.js
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
https://cra.link/deployment
> site-v2@0.1.0 postbuild
> react-snap
q
^C
Gracefully shutting down. To exit immediately, press ^C again
^C
pk@ubuntu20:~/sandbox/peter-test$ cd build/
pk@ubuntu20:~/sandbox/peter-test/build$ ls
200.html asset-manifest.json index.html locales manifest.json robots.txt static
pk@ubuntu20:~/sandbox/peter-test/build$ more index.html
<!doctype html><html lang="pt"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel=
"apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>AddressForAll</title><script defer="defer" src="/static/js/main.d734fbde.js"></script
><link href="/static/css/main.241a24a2.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
Así se ve de mi lado:
@.:~/peter-test$ cd build/ @.:~/peter-test/build$ ls 200.html contribute index.html robots.txt visualization 404.html data locales services about documentation manifest.json static api downloads partners statute asset-manifest.json faq projects statutes
Al parecer está fallando de su lado el mecanismo que emula un browser (puppeteer) y construye las páginas estáticas. Ahí el problema apunta más a Ubuntu que a Note o React. Puedo estar equivocado, mejor pedirle a Carlos intentar con Peter-test
On Jun 22, 2022, at 4:14 PM, Peter @.***> wrote:
Bugs ainda se usando versão "limpa", de https://github.com/elpbatista/peter-test https://github.com/elpbatista/peter-test git clone https://github.com/elpbatista/peter-test.git Cloning into 'peter-test'... remote: Enumerating objects: 258, done. remote: Counting objects: 100% (258/258), done. remote: Compressing objects: 100% (211/211), done. remote: Total 258 (delta 67), reused 229 (delta 38), pack-reused 0 Receiving objects: 100% (258/258), 4.47 MiB | 33.15 MiB/s, done. Resolving deltas: 100% (67/67), done. @.:~/sandbox$ cd peter-test/ @.:~/sandbox/peter-test$ npm install npm WARN deprecated @.: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated @.: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm WARN deprecated @.: This SVGO version is no longer supported. Upgrade to v2.x.x. npm WARN deprecated @.: Version no longer supported. Upgrade to @latest
added 1537 packages, and audited 1538 packages in 13s
193 packages are looking for funding run
npm fund
for details14 vulnerabilities (1 moderate, 12 high, 1 critical)
To address all issues (including breaking changes), run: npm audit fix --force
Run
npm audit
for details. @.***:~/sandbox/peter-test$ npm run build@.*** build react-scripts build
Creating an optimized production build... Compiled successfully.
File sizes after gzip:
163.78 kB build/static/js/main.d734fbde.js 2.54 kB build/static/css/main.241a24a2.css 1.78 kB build/static/js/787.222f8364.chunk.js
The project was built assuming it is hosted at /. You can control this with the homepage field in your package.json.
The build folder is ready to be deployed. You may serve it with a static server:
npm install -g serve serve -s build
Find out more about deployment here:
@.*** postbuild react-snap
q
^C Gracefully shutting down. To exit immediately, press ^C again ^C @.:~/sandbox/peter-test$ cd build/ @.:~/sandbox/peter-test/build$ ls 200.html asset-manifest.json index.html locales manifest.json robots.txt static @.***:~/sandbox/peter-test/build$ more index.html <!doctype html>
AddressForAll Githubissues.Githubissues is a development platform for aggregating issues.
Using Ubuntu 20 LTS, after this nodeJs installation:
Using docs/en/react.md guide. After
git pull
and runningnpm install
:After run
npm run build
: