scratchfoundation / scratch-www

Standalone web client for Scratch
https://scratch.mit.edu
BSD 3-Clause "New" or "Revised" License
1.59k stars 837 forks source link

many npm err! then Cannot find module 'express' #7322

Open testtest954 opened 1 year ago

testtest954 commented 1 year ago

everything when i do it on cmd Microsoft Windows [Version 10.0.19045.2364] (c) Microsoft Corporation. All rights reserved.

C:\Users\TheEzraGamer>e:

E:>cd scratch-www-develop

E:\scratch-www-develop>npm instalk Unknown command: "instalk"

Did you mean this? npm install # Install a package

To see a list of supported npm commands, run: npm help

E:\scratch-www-develop>npm install npm WARN deprecated request@2.12.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated bind-obj-methods@2.0.1: do not use this version, it is broken npm WARN deprecated os-homedir@2.0.0: This is not needed anymore. Use require('os').homedir() instead. npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update! npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit https://github.com/lukeed/kleur/releases/tag/v3.0.0\ for migration path(s). npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated request-promise-native@1.0.7: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.3: this library is no longer supported npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated audio-context@1.0.1: Depends on Web-Audio-API implementation. Use either web-audio-api, web-audio-js or web-audio-engine package. npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm WARN deprecated sane@2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm WARN deprecated intl-messageformat-parser@1.8.1: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated text-encoding@0.7.0: no longer maintained npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm WARN deprecated intl-messageformat-parser@1.4.0: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated intl-messageformat-parser@1.4.0: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated babel-plugin-react-intl@3.5.1: this package has been renamed to babel-plugin-formatjs npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated @mapbox/gl-matrix@0.0.1: This npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated mumath@3.3.4: Redundant dependency in your project. 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 intl-relativeformat@2.2.0: This package has been deprecated, please see migration guide at 'https://github.com/formatjs/formatjs/tree/master/packages/intl-relativeformat#migration-guide' npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.3.0: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.5.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.6.9: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.6.9: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated core-js@2.6.9: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path E:\scratch-www-develop\node_modules\canvas npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Warning: Missing input files: npm ERR! C:\GTK\bin\libgthread-2.0-0.dll npm ERR! C:\GTK\bin\libpangowin32-1.0-0.dll npm ERR! C:\GTK\bin\libgmodule-2.0-0.dll npm ERR! C:\GTK\bin\libpangocairo-1.0-0.dll npm ERR! C:\GTK\bin\libpango-1.0-0.dll npm ERR! C:\GTK\bin\libintl-8.dll npm ERR! C:\GTK\bin\libglib-2.0-0.dll npm ERR! C:\GTK\bin\libfreetype-6.dll npm ERR! C:\GTK\bin\libgobject-2.0-0.dll npm ERR! C:\GTK\bin\libpangoft2-1.0-0.dll npm ERR! C:\GTK\bin\libcairo-2.dll npm ERR! C:\GTK\bin\libfontconfig-1.dll npm ERR! C:\GTK\bin\libpng14-14.dll npm ERR! C:\GTK\bin\libexpat-1.dll npm ERR! C:\GTK\bin\zlib1.dll npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. npm ERR! Backend.cc npm ERR! E:\scratch-www-develop\node_modules\canvas\src\backend\Backend.h(3,10): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory [E:\scratch-www-develop\node_modules\canvas\build\canvas.vcxproj] npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\scratch-www-develop\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=E:\scratch-www-develop\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@1.0.8 npm ERR! node-pre-gyp info using node@18.12.1 | win32 | x64 npm ERR! node-pre-gyp info check checked for "E:\scratch-www-develop\node_modules\canvas\build\Release\canvas.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v108-win32-unknown-x64.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v108-win32-unknown-x64.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for canvas@2.9.0 and node@18.12.1 (node-v108 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.9.0/canvas-v2.9.0-node-v108-win32-unknown-x64.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@18.12.1 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@18.12.1 | win32 | x64 npm ERR! gyp info find Python using Python version 3.11.0 found at "E:\pythonprogram\python.exe" npm ERR! gyp info find VS using VS2022 (17.4.33103.184) found at: npm ERR! gyp info find VS "E:\visual2022\visual" npm ERR! gyp info find VS run with --verbose for detailed information npm ERR! gyp info spawn E:\pythonprogram\python.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'msvs', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'E:\scratch-www-develop\node_modules\canvas\build\config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args 'C:\Users\TheEzraGamer\AppData\Local\node-gyp\Cache\18.12.1\include\node\common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\TheEzraGamer\AppData\Local\node-gyp\Cache\18.12.1', npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\TheEzraGamer\\AppData\\Local\\node-gyp\\Cache\\18.12.1\\<(target_arch)\\node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=E:\scratch-www-develop\node_modules\canvas', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'E:\scratch-www-develop\node_modules\canvas\build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.1.0 npm ERR! gyp info using node@18.12.1 | win32 | x64 npm ERR! gyp info spawn E:\visual2022\visual\MSBuild\Current\Bin\MSBuild.exe npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args 'build/binding.sln', npm ERR! gyp info spawn args '/clp:Verbosity=minimal', npm ERR! gyp info spawn args '/nologo', npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: E:\visual2022\visual\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:201:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=E:\scratch-www-develop\node_modules\canvas\build\Release\canvas.node" "--module_name=canvas" "--module_path=E:\scratch-www-develop\node_modules\canvas\build\Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108" npm ERR! gyp ERR! cwd E:\scratch-www-develop\node_modules\canvas npm ERR! gyp ERR! node -v v18.12.1 npm ERR! gyp ERR! node-gyp -v v9.1.0 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=E:\scratch-www-develop\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=E:\scratch-www-develop\node_modules\canvas\build\Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess. (E:\scratch-www-develop\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16) npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045 npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\scratch-www-develop\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd E:\scratch-www-develop\node_modules\canvas npm ERR! node-pre-gyp ERR! node -v v18.12.1 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.8 npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TheEzraGamer\AppData\Local\npm-cache_logs\2023-01-03T07_51_38_497Z-debug-0.log

E:\scratch-www-develop>npm run build

www@1.0.0 build npm run clean && npm run translate && NODE_OPTIONS=--max_old_space_size=8000 webpack --bail

www@1.0.0 clean rm -rf ./build && rm -rf ./intl && mkdir -p build && mkdir -p intl

A subdirectory or file -p already exists. Error occurred while processing: -p.

E:\scratch-www-develop>npm start

www@1.0.0 start node ./dev-server/index.js

node:internal/modules/cjs/loader:998 throw err; ^

Error: Cannot find module 'express' Require stack:

Node.js v18.12.1

E:\scratch-www-develop> im in windows

ajskateboarder commented 1 year ago

Based off these lines from your traceback:

npm ERR! Warning: Missing input files: npm ERR! C:\GTK\bin\libgthread-2.0-0.dll npm ERR! C:\GTK\bin\libpangowin32-1.0-0.dll npm ERR! C:\GTK\bin\libgmodule-2.0-0.dll npm ERR! C:\GTK\bin\libpangocairo-1.0-0.dll npm ERR! C:\GTK\bin\libpango-1.0-0.dll npm ERR! C:\GTK\bin\libintl-8.dll npm ERR! C:\GTK\bin\libglib-2.0-0.dll npm ERR! C:\GTK\bin\libfreetype-6.dll npm ERR! C:\GTK\bin\libgobject-2.0-0.dll npm ERR! C:\GTK\bin\libpangoft2-1.0-0.dll npm ERR! C:\GTK\bin\libcairo-2.dll npm ERR! C:\GTK\bin\libfontconfig-1.dll npm ERR! C:\GTK\bin\libpng14-14.dll npm ERR! C:\GTK\bin\libexpat-1.dll npm ERR! C:\GTK\bin\zlib1.dll

You'll have to install every library that NPM complained is missing Hopefully this helps

lankybox02 commented 1 year ago

npm i express