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
Related
my node version is 10.13.0, i'm using this version because of a specific project dependency and i'm using my office laptop,
I'm also having
+-- gulp#4.0.2
+-- typescript#4.9.5
`-- yo#4.3.1
i want to install "npm i -g #microsoft/generator-sharepoint" but i'm getting error "code EEXIST"
I'm new to this so don't have much knowledge what is this and i'm working on this for 2 days still not able to fix it.
npm WARN deprecated uuid#3.1.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 read-package-tree#5.1.6: The functionality that this package provided is now in #npmcli/arborist
npm WARN deprecated readdir-scoped-modules#1.1.0: This functionality has been moved to #npmcli/fs
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated 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
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
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 querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated #npmcli/move-file#1.1.2: This functionality has been moved to #npmcli/fs
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.3.2 (node_modules\#microsoft\generator-sharepoint\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules\#microsoft\generator-sharepoint\node_modules\watchpack-chokidar2\node_modules\chokidar\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 optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\#microsoft\generator-sharepoint\node_modules\#rushstack\typings-generator\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 yeoman-generator#5.6.1 requires a peer of yeoman-environment#^3.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-module-minifier-plugin#0.9.31 requires a peer of #types/webpack#* but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-module-minifier-plugin#0.9.31 requires a peer of #types/webpack-sources#* but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.7 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack4-localization-plugin#0.15.25 requires a peer of #types/webpack#^4.39.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/set-webpack-public-path-plugin#3.3.69 requires a peer of #types/webpack#^4.39.8 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/set-webpack-public-path-plugin#3.3.69 requires a peer of webpack#^5.35.1 but none is installed. You must install peer dependencies yourself.
npm WARN #microsoft/loader-load-themed-styles#1.9.174 requires a peer of #types/webpack#^4 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#8.0.2 requires a peer of node-sass#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader#8.0.2 requires a peer of fibers#>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.9 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN node-fetch#2.6.7 requires a peer of encoding#^0.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack-plugin-utilities#0.1.36 requires a peer of #types/webpack#^4.39.8 but none is installed. You must install peer dependencies yourself.
npm WARN #rushstack/webpack-plugin-utilities#0.1.36 requires a peer of webpack#^5.35.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#8.12.0 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#8.12.0 requires a peer of utf-8-validate#>=5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-formats#2.1.1 requires a peer of ajv#^8.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! path C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd: is outside C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\browserslist and not a link
npm ERR! File exists: C:\Users\AryanSharma\AppData\Roaming\npm\node_modules\#microsoft\generator-sharepoint\node_modules\.bin\browserslist.cmd
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AryanSharma\AppData\Roaming\npm-cache\_logs\2023-02-02T09_55_50_116Z-debug.log
I want to create a new webpart but so many errors
as this error suggests: npm ERR! Move it away, and try again. Please Check whether you have installed the package in your environment, and then try to remove and reinstall it.
The version of the yeoman template you are trying to install is not compatible with NodeJs v10.13.1. Use the following command instead
npm i -g #microsoft/generator-sharepoint#1.12.1
The full list of SPFx compatibility can be found at https://learn.microsoft.com/en-us/sharepoint/dev/spfx/compatibility
From that list, you can see that SPFx v1.12.1 is the last version that supported NodeJs v10.x
Also, you should remove gulp from the global space and replace it with gulp-cli by running the following commands
npm uninstall - gulp
npm i -g gulp-cli
Having typescript installed is also unneeded, so that can be uninstalled.
Lastly, you can always ignore the WARN messages.
Good luck!
Good luck!Don
If my answer helps solve or resolve your issue, please consider clicking Mark as Best Response & Like. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it a Like.
I'm trying to share React components between a web project and desktop project. I found this article that details how to do so while not ejecting from create-react-app.
https://medium.com/capriza-engineering/sharing-source-code-and-libraries-in-react-bd30926df312
In short, it says:
- Create two React projects with CRA, one with the shared components and another that will be consuming them.
- Install the shared project in the consumer project as a symlink with npm install "../shared-project".
- Use react-app-rewired and customize-cra to make Babel compile everything in the common folder.
Although, after using npm install "../shared-project" I get the following:
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\jest as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\jest
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\rimraf as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\rimraf
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\svgo as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\svgo
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\js-yaml as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\js-yaml
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\browserslist as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\browserslist
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\semver as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\semver
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate.cmd as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esvalidate as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
npm WARN rm not removing D:\Projects--Tests\Project\web\node_modules\.bin\esparse as it wasn't installed by D:\Projects--Tests\Project\web\node_modules\esprima
> core-js#2.6.9 postinstall D:\Projects--Tests\Project\web\node_modules\babel-runtime\node_modules\core-js
> node scripts/postinstall || echo "ignore"
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#3.1.4 postinstall D:\Projects--Tests\Project\web\node_modules\core-js
> node scripts/postinstall || echo "ignore"
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 -)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.4 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.13.0 requires a peer of eslint#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ shared#0.1.0
added 126 packages from 43 contributors, removed 190 packages, updated 1297 packages and audited 1794232 packages in 314.002s
found 14108 vulnerabilities (3 moderate, 14104 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details
If I continue with the steps detailed above everything works but what worries me the most is the 3 moderate, 14104 high, 1 critical message. I don't what to look past it. Any idea how can I fix this?
Thanks in advance!
I am very new to the frustrating world of NPM.
I have run create-react-app, it installs except for the following warning messages
yarn add v1.17.3
[1/4] Resolving packages...
warning react-scripts > fsevents#2.0.6: Please update: there are crash fixes
[2/4] Fetching packages...
info fsevents#1.2.9: The platform "linux" is incompatible with this module.
info "fsevents#1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.0.6: The platform "linux" is incompatible with this module.
info "fsevents#2.0.6" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-scripts > #typescript-eslint/eslint-plugin#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/parser#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/eslint-plugin > #typescript-eslint/typescript-estree#1.6.0" has unmet peer dependency "typescript#*".
warning "react-scripts > #typescript-eslint/eslint-plugin > tsutils#3.10.0" has unmet peer dependency "typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev".
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 11 new dependencies.
Once it goes through to the end, if i try to install another package (any package) i.e npm install bootstrap --save i keep getting errors like;
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated flatten#1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated fsevents#2.0.6: Please update: there are crash fixes
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/jest as it wasn't installed by /home/vagrant/admin/node_modules/jest
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/uglifyjs as it wasn't installed by /home/vagrant/admin/node_modules/uglify-js
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/semver as it wasn't installed by /home/vagrant/admin/node_modules/semver
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/esparse as it wasn't installed by /home/vagrant/admin/node_modules/esprima
npm WARN rm not removing /home/vagrant/admin/node_modules/.bin/esvalidate as it wasn't installed by /home/vagrant/admin/node_modules/esprima
npm WARN bootstrap#4.3.1 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.3.1 requires a peer of popper.js#^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/parser#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/eslint-plugin#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN #typescript-eslint/typescript-estree#1.6.0 requires a peer of typescript#* but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.15.0 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! path /home/vagrant/admin/node_modules/#hapi/topo/node_modules/#hapi/hoek/package.json.1181420959
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/admin/node_modules/#hapi/topo/node_modules/#hapi/hoek/package.json.1181420959'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2019-08-05T11_56_29_110Z-debug.log
I have tried updating the packages using `npm -g update. But still nothing
Any help would be greatly appreciated, its driving me NUTS!
There are a number of packages on npm that attempt to solve this very problem in different ways. I've used npx npm-install-peers in the past, but I had to run it again after every new install, as the peer dependencies were wiped out on every normal npm install.
Edit: you might want to add npm-install-peers to both postinstall and postuninstall scripts so you don't have to do it manually each time you (un)install something.
I just ran:
npm install typescript
to install the latest and now I don't see that peer package error. You could also install it global, I suppose:
npm install -g typescript
which would most certainly work just the same.
I downloaded existing Web project and tried to run:
webpack --watch --progress
but it keeps saying:
webpack --watch --progress
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): yes
Installing 'webpack-cli' (running 'npm install -D webpack-cli')...
npm WARN #ngtools/webpack#1.10.2 requires a peer of webpack#^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror#1.1.3 requires a peer of #angular/core#^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror#1.1.3 requires a peer of #angular/forms#^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-codemirror#1.1.3 requires a peer of #angular/common#^2.1.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware#1.12.2 requires a peer of webpack#^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server#2.11.3 requires a peer of webpack#^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ webpack-cli#3.1.2
added 2 packages from 2 contributors, removed 1 package, updated 3 packages and audited 24726 packages in 16.453s
found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
{ Error: Cannot find module 'webpack-cli'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at runCommand.then (...\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:142:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
Does WebPack require specific NPM/Node version? (maybe newer version is not compatible with older one)..
https://stackoverflow.com/a/41305211
Oleg Pro's help did the trick for me, specifically putting node_modules/.bin in my path as he describes in part 3.
With my versions of webpack (4.29.0) and Node (v10.15.0), I didn't find node_modules/.bin/webpack-cmd (as he specifies in 1.) in my project directory; I found node_modules/.bin/webpack-cli.
The install appears to work, as I then used webpack to install Vue, which in turn generated app.vue and hello_vue.js files. However, vue --version returns vue:command not found, so I'm adopting a wait and see attitude.
I'm having trouble installing webpack dev with the following command: npm i --save-dev webpack
Webpack is installed succesfully on my computer as npm i webpack -g #3.5.5 so no issues here.
When I run npm i --save-dev webpack I get a babel-core error reading the following; it will not let me proceed without usinf webpack 1, 2 pr 2.1.0-beta
I cannot get past this and have search stackoverflow and multiple sites.
In my situation, I'm using it with Redux on Windows.
This is my error.
`-- UNMET PEER DEPENDENCY webpack#3.5.5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\ch
okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN babel-loader#6.2.10 requires a peer of webpack#1 || 2 || ^2.1.0-beta ||
^2.2.0-rc but none was installed.
npm WARN prj400r#1.0.0 No description
npm WARN prj400r#1.0.0 No repository field.
Highlighting the babel-core error as being the most problematic. Any workaround?
Update babel-loader to version 7.x.x and it should solve your problem. The previous versions required webpack 1 and this support was dropped in version 7
Release v7.0.0