demipixel / autotorio

autotorio.com
autotorio.vercel.app
GNU General Public License v3.0
67 stars 17 forks source link

Error: Cannot find module './router' #63

Open Thispain opened 8 months ago

Thispain commented 8 months ago

When I try to run the project with "node app.js" I get this error message.

I took the following steps to eliminate the error message:

I fixed the 2nd error by running "scripts/postinstall.js", but the 1st is remained here.

demipixel commented 8 months ago

Try running it with npm run dev or npm run build && npm run start

Thispain commented 8 months ago

I was running it with npm run dev and:

autotorio@1.0.0 dev next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000 Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating wait - compiling... event - compiled client and server successfully in 6.8s (1042 modules) wait - compiling /outpost (client and server)... wait - compiling... error - ./node_modules/factorio-generators/tools/blueprintTool.js:1:0 Module not found: Can't resolve 'factorio-blueprint'

Import trace for requested module: ./node_modules/factorio-generators/index.js ./lib/generators/ore-outpost.generator.ts ./pages/outpost.tsx

https://nextjs.org/docs/messages/module-not-found wait - compiling /_error (client and server)... wait - compiling... event - compiled client and server successfully in 25.1s (1043 modules) error - Error: Cannot find module '$MYLOCALPATH\autotorio\node_modules\factorio-blueprint\dist\factorio-blueprint.min.js'. Please verify that the package.json has a valid "main" entry

Failed to compile ./node_modules/factorio-generators/tools/blueprintTool.js:1:0 Module not found: Can't resolve 'factorio-blueprint'

Import trace for requested module: ./node_modules/factorio-generators/index.js ./lib/generators/ore-outpost.generator.ts ./pages/outpost.tsx

https://nextjs.org/docs/messages/module-not-found This error occurred during the build process and can only be dismissed by fixing the error.

I was using npm install factorio-blueprint command, and it didn't change the situation, because the factorio-blueprint package have not dist folder.