Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(node:2256) UnhandledPromiseRejectionWarning: TypeError: pattern.replace is not a function #9667

Closed
xianxuzhen opened this issue Aug 13, 2021 · 3 comments

Comments

@xianxuzhen
Copy link

xianxuzhen commented Aug 13, 2021

Versions

  • nuxt: 2.4.0
  • node: v12.6.0

Reproduction

Additional Details

Steps to reproduce

npm install
npm run dev

What is Expected?

cross-env NODE_ENV=development nodemon server/index.js --watch server

[nodemon] 2.0.12
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): server***
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node server/index.js
i Preparing project for development 09:53:26
i Initial build may take a while 09:53:26
√ Builder initialized 09:53:26
√ Nuxt files generated 09:53:26
(node:2256) UnhandledPromiseRejectionWarning: TypeError: pattern.replace is not a function
at WebpackClientConfig.normalizeTranspile (D:\git\666\sunlogin.oray.com\node_modules@nuxt\webpack\dist\webpack.js:4341:37)
at new WebpackBaseConfig (D:\git\666\sunlogin.oray.com\node_modules@nuxt\webpack\dist\webpack.js:4314:36)
at new WebpackClientConfig (D:\git\666\sunlogin.oray.com\node_modules@nuxt\webpack\dist\webpack.js:4731:5)
at WebpackBundler.build (D:\git\666\sunlogin.oray.com\node_modules@nuxt\webpack\dist\webpack.js:5133:26)
at Builder.build (D:\git\666\sunlogin.oray.com\node_modules@nuxt\builder\dist\builder.js:5518:30)
at async start (D:\git\666\sunlogin.oray.com\server\index.js:28:5)
(node:2256) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2256) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[nodemon] clean exit - waiting for changes before restart

package.json

/{
"name": "1",
"version": "1.0.0",
"description": "11",
"author": "xianxuzhen",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
"build": "nuxt build",
"build-testing": "cross-env NODE_ENV=testing nuxt build",
"start-dev": "cross-env NODE_ENV=development node server/index.js",
"start": "cross-env NODE_ENV=production node server/index.js",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/component-cache": "^1.1.4",
"async-validator": "^1.10.1",
"jquery": "^3.3.1",
"jquery-migrate": "^3.0.1",
"jsonp": "^0.2.1",
"koa": "^2.6.2",
"nuxt": "~2.4.0",
"object-fit": "^0.4.3",
"qs": "^6.6.0",
"sa-sdk-javascript": "^1.13.2",
"sass": "^1.26.8",
"vue-awesome-swiper": "^3.1.3",
"cross-env": "^5.2.0",
"vue-ba": "^1.2.5"
},
"devDependencies": {
"core-js": "2",
"node-sass": "^4.11.0",
"nodemon": "^2.0.12",
"sass-loader": "^7.1.0"
}
/}

Copy link
Member

Would you provide a reproduction via https://template.nuxtjs.org? 🙏

@stale
Copy link

stale bot commented Apr 27, 2022

Thanks for your contribution to Nuxt!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

@stale stale bot added the stale label Apr 27, 2022
@kangw3n
Copy link

kangw3n commented May 30, 2022

For those who encounter same issue: [which stuck me around hours to tracing each fn]
This Issues cause by patterns receive none string value upon transpile,
fixed your axios dependencies on >5.13.5 will temporary fixed this issue

@stale stale bot removed the stale label May 30, 2022
@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants