So I have npm 7.5.3 and node v15.8.0 on my ubuntu system. I'm trying to create a react-native project as follows:
npx react-native init Sample
And I get a large error dump with the following description towards the end
Installing react-native...
yarn add v1.16.0
warning ../../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs > core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
warning react-native > fbjs-scripts > core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
warning react-native > #react-native-community/cli > #hapi/joi#15.1.1: Switch to 'npm install joi'
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/topo > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > metro > jest-haste-map > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-native > #react-native-community/cli > metro > jest-haste-map > micromatch > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning react-native > #react-native-community/cli > metro > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
error react-native#0.63.4: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.16.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (node:child_process:681:11)
at execSync (node:child_process:718:15)
at run (/usr/lib/node_modules/react-native-cli/index.js:294:5)
at createProject (/usr/lib/node_modules/react-native-cli/index.js:249:3)
at init (/usr/lib/node_modules/react-native-cli/index.js:200:5)
at Object.<anonymous> (/usr/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 24544,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.
npm ERR! code 1
npm ERR! path /home/anton/Documents/front-end
npm ERR! command failed
npm ERR! command sh -c react-native "init" "sample"
npm ERR! A complete log of this run can be found in:
npm ERR! /home/anton/.npm/_logs/2021-02-09T18_06_36_328Z-debug.log
How do I overcome this problem?
edit: I already attempted npm install --save core-js#^3 the error remains the same.
Related
I am trying to generate an apk with EAS locally and it gives me an error
Following various answers from stack, I have tried deleting node_modudes, yarn.lock and package.json and running yarn install, but at the end of the process it gives me the same error:
error expo-cli#5.6.0: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.14.0"
error Found incompatible module.
After upgrading with yarn install I try to build apk with eas build --local and it gives me the following errors:
[INSTALL_DEPENDENCIES] warning #unimodules/core#7.2.0: replaced by the 'expo' package, learn more: https://blog.expo.dev/whats-new-in-expo-modules-infrastructure-7a7cdda81ebc
[INSTALL_DEPENDENCIES] warning expo > 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.
[INSTALL_DEPENDENCIES] warning expo > expo-constants > 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.
[INSTALL_DEPENDENCIES] warning expo > expo-file-system > 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.
[INSTALL_DEPENDENCIES] warning expo > fbemitter > fbjs > core-js#1.2.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.
[INSTALL_DEPENDENCIES] warning expo-cli#5.6.0: No longer supported
[INSTALL_DEPENDENCIES] warning expo-cli > cacache > #npmcli/move-file#1.1.2: This functionality has been moved to #npmcli/fs
[INSTALL_DEPENDENCIES] warning expo-cli > #expo/dev-tools > subscriptions-transport-ws#0.9.8: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
[INSTALL_DEPENDENCIES] warning expo-cli > #expo/dev-tools > graphql-tools#3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
[INSTALL_DEPENDENCIES] warning expo-cli > #expo/dev-tools > graphql-tools > 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.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > webpack-log > 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.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > sockjs > 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.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > url > querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack-dev-server > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > watchpack > watchpack-chokidar2 > chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > webpack > micromatch > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > #expo/webpack-config > optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
[INSTALL_DEPENDENCIES] warning expo-cli > xdl > #expo/webpack-config > optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo > stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
[INSTALL_DEPENDENCIES] warning expo-updates > 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.
[INSTALL_DEPENDENCIES] warning react-native > #react-native-community/cli-platform-ios > xcode > 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.
[INSTALL_DEPENDENCIES] warning react-native > #react-native-community/cli > metro > jest-haste-map > sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[INSTALL_DEPENDENCIES] warning react-native > #react-native-community/cli > metro > metro-minify-uglify > uglify-es#3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
[INSTALL_DEPENDENCIES] [2/4] Fetching packages...
[INSTALL_DEPENDENCIES] error expo-cli#5.6.0: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.14.0"
[INSTALL_DEPENDENCIES] error Found incompatible module.
[INSTALL_DEPENDENCIES] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INSTALL_DEPENDENCIES]
Error: yarn exited with non-zero code: 1
at ChildProcess.completionListener (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/spawn-async/build/spawnAsync.js:41:23)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:322:12)
...
at spawnAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/spawn-async/build/spawnAsync.js:7:23)
at spawn (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/turtle-spawn/dist/index.js:17:47)
at installDependencies (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/utils/project.js:107:38)
at async /private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/utils/project.js:39:9
at async BuildContext.runBuildPhase (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/context.js:72:28)
at async setup (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/utils/project.js:38:5)
at async buildAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/builders/android.js:19:5)
at async runBuilderWithHooksAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/builders/common.js:13:13)
at async Object.androidBuilder (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/#expo/build-tools/dist/builders/android.js:15:12)
at async buildAndroidAsync (/private/var/root/.npm/_npx/86c1f166462562ca/node_modules/eas-cli-local-build-plugin/dist/android.js:62:12)
Build failed
Unknown error. See logs for more information.
Error: npx exited with non-zero code: 1
How can I fix this error to generate the apk? Thank you.
I am attempting to add an additional functionality to the Divi WordPress theme. To do this, I am trying to build an extension to the theme and then a custom module within the extension. Elegant Themes, the developer of Divi, provides a tutorial for creating an extension and also for creating a module within the extension.
My development PC is running XAMPP over Ubuntu 20.04. I followed the tutorials and installed WordPress + Divi. I then installed Node.js by running sudo apt install node and then installed npm by running sudo apt install npm. Next, I ran sudo npm install -g yarn to install Yarn.
The next step called for me to navigate to the plugins folder (/opt/lampp/htdocs/development/wp-content/plugins) of my WordPress site and run npx create-divi-extension development-1.
When I attempted to run this command, I received the following response:
dev#dev:/opt/lampp/htdocs/development/wp-content/plugins$ npx create-divi-extension development-1
npx: installed 174 in 11.696s
Creating a new Divi extension in /opt/lampp/htdocs/development/wp-content/plugins/development-1.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and divi-scripts...
yarn add v1.22.11
info No lockfile found.
[1/4] Resolving packages...
warning divi-scripts > babel-eslint#8.2.2: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
warning divi-scripts > eslint-loader#1.9.0: This loader has been deprecated. Please use eslint-webpack-plugin
warning divi-scripts > extract-text-webpack-plugin#3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
warning divi-scripts > html-webpack-plugin#2.30.1: out of support
warning divi-scripts > fsevents#1.1.3: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning divi-scripts > #babel/runtime > core-js#2.6.12: core-js#<3.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. Please, upgrade your dependencies to the actual version of core-js.
warning divi-scripts > autoprefixer > browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning divi-scripts > divi-dev-utils > browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning divi-scripts > css-loader > cssnano > autoprefixer > browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning divi-scripts > node-sass > request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning divi-scripts > node-sass > node-gyp > request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning divi-scripts > fsevents > node-pre-gyp#0.6.39: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
warning divi-scripts > fsevents > node-pre-gyp > request#2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
warning divi-scripts > grunt-contrib-compress > iltorb#2.4.5: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb
warning divi-scripts > uglifyjs-webpack-plugin > uglify-es#3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
warning divi-scripts > webpack-dev-server > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning divi-scripts > webpack-dev-server > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning divi-scripts > css-loader > cssnano > postcss-merge-rules > browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning divi-scripts > node-sass > request > har-validator#5.1.5: this library is no longer supported
warning divi-scripts > fsevents > node-pre-gyp > request > har-validator#4.2.1: this library is no longer supported
warning divi-scripts > node-sass > request > 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.
warning divi-scripts > fsevents > node-pre-gyp > request > 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.
warning divi-scripts > webpack-dev-server > sockjs > 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.
warning divi-scripts > node-sass > node-gyp > tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning divi-scripts > fsevents > node-pre-gyp > tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning divi-scripts > fsevents > node-pre-gyp > tar-pack > tar#2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning divi-scripts > fsevents > node-pre-gyp > hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning divi-scripts > fsevents > node-pre-gyp > request > hawk#3.1.3: This module moved to #hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning divi-scripts > webpack > watchpack > watchpack-chokidar2 > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning divi-scripts > css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning divi-scripts > eslint > file-entry-cache > flat-cache > circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
warning divi-scripts > fsevents > node-pre-gyp > hawk > sntp#1.0.9: This module moved to #hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning divi-scripts > fsevents > node-pre-gyp > hawk > cryptiles#2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > fsevents > node-pre-gyp > hawk > boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > fsevents > node-pre-gyp > hawk > cryptiles > boom#2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > fsevents > node-pre-gyp > hawk > hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > fsevents > node-pre-gyp > hawk > sntp > hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > fsevents > node-pre-gyp > hawk > boom > hoek#2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning divi-scripts > jest > #jest/core > jest-haste-map > sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning divi-scripts > svgr > h2x-core > h2x-parse > jsdom > request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning divi-scripts > webpack > node-libs-browser > url > querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning divi-scripts > babel-jest > babel-plugin-istanbul > istanbul-lib-instrument > babel-template > babel-runtime > core-js#2.6.12: core-js#<3.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. Please, upgrade your dependencies to the actual version of core-js.
warning divi-scripts > css-loader > cssnano > postcss-merge-rules > postcss-selector-parser > flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
warning divi-scripts > svgr > h2x-core > h2x-parse > jsdom > request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
warning divi-scripts > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning divi-scripts > webpack-dev-server > chokidar > braces > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info fsevents#1.1.3: The platform "linux" is incompatible with this module.
info "fsevents#1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.2: The platform "linux" is incompatible with this module.
info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
error grunt-po2mo#0.1.5: The engine "node" is incompatible with this module. Expected version "12.x || 14.x". Got "10.19.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom divi-scripts --cwd /opt/lampp/htdocs/development/wp-content/plugins/development-1 has failed.
Deleting generated file... package.json
Deleting development-1/ from /opt/lampp/htdocs/development/wp-content/plugins
Done.
When I run node -v I receive v.10.19.0 as a response and when I run npm -v I get 6.14.4.
At this point, this issue is somewhat beyond my expertise and quite confusing to me. All that I can come to understand is that divi-scripts and fsevents are outdated. I'm not sure what those are, what would cause that, or how to fix it.
If someone could provide me with some insight on this issue and some direction in resolving it, it would be much appreciated. Thank you very much.
The issue was a result of not using the correct version of Node and not having the divi-scripts package installed. The fix was simple really.
Step 1: In my home directory, I ran sudo n stable and this updated Node to the latest LTS version.
Step 2: While still in my home directory, I ran npm install divi-scripts. There were still some errors about deprecated dependencies (see here) but it worked.
Step 3: Navigated to my project folder and ran npx create-divi-extension development-1 and it ran successfully, but still with errors about deprecated dependencies for divi-scripts.
I am not able to create a new react app.
So far it worked great, but today I had to install yarn and since I would get this error, when I tried to create a new react app:
➜ workspace npx create-react-app storybook-tutorial
Creating a new React app in /home/ficho/workspace/storybook-tutorial.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.10
[1/4] Resolving packages...
warning react-scripts > babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
warning react-scripts > workbox-webpack-plugin > workbox-build > #hapi/joi#15.1.1: Switch to 'npm install joi'
warning react-scripts > workbox-webpack-plugin > workbox-build > rollup-plugin-babel#4.4.0: This package has been deprecated and is no
longer maintained. Please use #rollup/plugin-babel.
warning react-scripts > jest > #jest/core > jest-config > jest-environment-jsdom > jsdom > request-promise-native#1.0.9:
request-promise-native has been deprecated because it extends the now
deprecated request package, see
https://github.com/request/request/issues/3142
warning react-scripts > jest > #jest/core > jest-config > jest-environment-jsdom > jsdom > request#2.88.2: request has been
deprecated, see https://github.com/request/request/issues/3142
[2/4] Fetching packages...
info fsevents#1.2.12: The platform "linux" is incompatible with this module.
info "fsevents#1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
error postcss#8.2.4: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.8.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd /home/ficho/workspace/storybook-tutorial has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting storybook-tutorial/ from /home/ficho/workspace
Done.
I use Ubuntu 18.4.
I tried clearing cache: yarn cache clear and updating npm npm install -g npm#latest
Upgrade your node.js would solve this problem.
This is a general question I searched a solution for but I couldn't find resonable one.
First: I am building Laravel apps on homestead branch 20.04 development environment, everything works fine except when running npm install on any laravel new project I start receiving many errors for example:
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /home/vagrant/code/marketing/node_modules/resolve-url-loader/node_modules/postcss
npm ERR! dest /home/vagrant/code/marketing/node_modules/resolve-url-loader/node_modules/.postcss.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/home/vagrant/code/marketing/node_modules/resolve-url-loader/node_modules/postcss' -> '/home/vagrant/code/marketing/node_modules/resolve-url-loader/node_modules/.postcss.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
and sometimes another error such as:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/code/marketing/node_modules/babel-merge/node_modules/ms/package.json.822514419
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/marketing/node_modules/babel-merge/node_modules/ms/package.json.822514419'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
When I delete node_modules folder and run yarn install everything works fine without any error:
yarn install v1.22.5
info No lockfile found.
[1/4] Resolving packages...
warning laravel-mix > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning laravel-mix > webpack-dev-server > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning laravel-mix > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning laravel-mix > webpack > watchpack > watchpack-chokidar2 > chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning laravel-mix > chokidar > braces > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning laravel-mix > chokidar > braces > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning resolve-url-loader > rework > css > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
warning file-loader#2.0.0: Invalid bin field for "file-loader".
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 60.60s.
Can anybody explain why is this happening,
My Host OS: Windows 10
NodeJS: V14.15.1
Virtual Box: 6.1.12 r139181
Thanx,
Strange one today, wondering if you can help.
I recently reformatted my work laptop, and reinstalled all my tooling. Strangely, I'm finding I have to run npm install in full, before I can run yarn and yarn sb (which simply performs our storybook/start process) on new git cloned projects.
Simply running yarn as you can observe below, results in an error regarding Error: Cannot find module './es6.array.iterator'.
Any ideas why this may be? It appears npm install is doing some extra compilation steps yarn is not, I was of the understanding yarn would do everything npm install would do but a little more efficiently.
/* TRIED YARN BY ITSELF - FAILED */
PS C:\dev\projects\react-components-ts> yarn
yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents#1.2.13: The platform "win32" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.1.3: The platform "win32" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > material-table#1.66.0" has unmet peer dependency "#date-io/core#^1.3.6".
warning "material-table > #material-ui/pickers#3.2.10" has unmet peer dependency "#date-io/core#^1.3.6".
warning "#storybook/addon-actions > #storybook/api#5.3.19" has unmet peer dependency "regenerator-runtime#*".
warning "#storybook/addon-docs > #egoist/vue-to-react#1.1.0" has unmet peer dependency "vue#^2.6.10".
warning "#storybook/addon-docs > vue-docgen-loader#1.5.0" has unmet peer dependency "webpack#>=4".
warning " > #storybook/addon-storysource#5.3.19" has unmet peer dependency "#storybook/source-loader#*".
warning " > babel-loader#8.1.0" has unmet peer dependency "webpack#>=2".
[5/5] Building fresh packages...
$ tsdx build
Error: Cannot find module './es6.array.iterator'
Require stack:
- C:\dev\projects\react-components-ts\node_modules\babel-runtime\node_modules\core-js\library\modules\web.dom.iterable.js
- C:\dev\projects\react-components-ts\node_modules\babel-runtime\node_modules\core-js\library\fn\get-iterator.js
- C:\dev\projects\react-components-ts\node_modules\babel-traverse\lib\index.js
- C:\dev\projects\react-components-ts\node_modules\tsdx\dist\errors\extractErrors.js
- C:\dev\projects\react-components-ts\node_modules\tsdx\dist\createRollupConfig.js
- C:\dev\projects\react-components-ts\node_modules\tsdx\dist\createBuildConfigs.js
- C:\dev\projects\react-components-ts\node_modules\tsdx\dist\index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\dev\projects\react-components-ts\node_modules\babel-runtime\node_modules\core-js\library\modules\web.dom.iterable.js:1:1)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/* BUILT EXTRA STUFF */
PS C:\dev\projects\react-components-ts> npm i
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated os-homedir#2.0.0: This is not needed anymore. Use `require('os').homedir()` instead.
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated rollup-plugin-babel#4.4.0: This package has been deprecated and is no longer maintained. Please use #rollup/plugin-babel.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
> husky#4.2.5 preuninstall C:\dev\projects\react-components-ts\node_modules\husky
> node husky uninstall
husky > Uninstalling git hooks
husky > Done
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\jest.cmd as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\jest
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\jest as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\jest
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\rimraf.cmd as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\rimraf
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\rimraf as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\rimraf
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\semver.cmd as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\semver
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\semver as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\semver
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\detect.cmd as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\detect-port
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\detect-port.cmd as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\detect-port
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\detect as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\detect-port
npm WARN rm not removing C:\dev\projects\react-components-ts\node_modules\.bin\detect-port as it wasn't installed by C:\dev\projects\react-components-ts\node_modules\detect-port
> husky#4.2.5 install C:\dev\projects\react-components-ts\node_modules\husky
> node husky install
husky > Setting up git hooks
husky > Done
> core-js#2.6.11 postinstall C:\dev\projects\react-components-ts\node_modules\#babel\polyfill\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> core-js#2.6.11 postinstall C:\dev\projects\react-components-ts\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js#3.6.5 postinstall C:\dev\projects\react-components-ts\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure#3.6.5 postinstall C:\dev\projects\react-components-ts\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> ejs#2.7.4 postinstall C:\dev\projects\react-components-ts\node_modules\ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
> husky#4.2.5 postinstall C:\dev\projects\react-components-ts\node_modules\husky
> opencollective-postinstall || exit 0
Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate
> jsonpath#1.0.2 postinstall C:\dev\projects\react-components-ts\node_modules\jsonpath
> node lib/aesprim.js > generated/aesprim-browser.js
> #dhi/react-components-ts#0.2.6 prepare C:\dev\projects\react-components-ts
> tsdx build
✓ Creating entry file 18.7 secs
✓ Building modules 1.1 mins
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\jest-haste-map\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.3","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN acorn-dynamic-import#4.0.0 requires a peer of acorn#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #egoist/vue-to-react#1.1.0 requires a peer of vue#^2.6.10 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#5.2.1 requires a peer of #typescript-eslint/eslint-plugin#2.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#5.2.1 requires a peer of #typescript-eslint/parser#2.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app#5.2.1 requires a peer of eslint#6.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-hooks#2.5.1 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #dhi/react-components-ts#0.2.6 No repository field.
added 291 packages from 79 contributors, removed 188 packages, updated 2114 packages and audited 2414 packages in 334.47s
162 packages are looking for funding
run `npm fund` for details
found 2 vulnerabilities (1 low, 1 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
/* NOW YARN RUNS FINE - WITH OBVIOUS package-lock WARNING */
PS C:\dev\projects\react-components-ts> yarn
yarn install v1.22.4
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ tsdx build
✓ Creating entry file 7.3 secs
✓ Building modules 12.2 secs
Done in 21.32s.
/* AND WE CAN RUN OUR PROJECT */
PS C:\dev\projects\react-components-ts> yarn sb
yarn run v1.22.4
$ start-storybook -p 6006
info #storybook/react v5.3.19
info
info => Loading presets
info => Loading presets
info => Loading config/preview file in "./.storybook".
info => Adding stories defined in ".storybook\main.js".
info => Using default Webpack setup.
info => Using base config because react-scripts is not installed.
webpack built 19b2af886909fb20a73e in 53119ms
╭────────────────────────────────────────────────────╮
│ │
│ Storybook 5.3.19 started │
│ 26 s for manager and 55 s for preview │
│ │
│ Local: http://localhost:6006/ │
│ On your network: http://172.16.125.17:6006/ │
│ │
╰────────────────────────────────────────────────────╯
No issues found.
try to do:
yarn config set ignore-engines true
and then
yarn