Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Updated to latest version and getting a strange error when running npm run dev #1784

Open
go-aegian opened this issue Jun 26, 2021 · 5 comments

Comments

@go-aegian
Copy link

go-aegian commented Jun 26, 2021

When building throws this warning
(node:19188) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at xxxxx\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./".
(Use node --trace-deprecation ... to show where the warning was created)
(node:19188) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at xxxxx\node_modules\msal\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./
".

After it builds looks ok until attempting to access via browser localhost:3000

Listening on http://localhost:3000

_xxxxx\node_modules\polka\build.js:64
let info = this.parse(req, true);
^

TypeError: this.parse is not a function
at Polka.handler (xxxxx\node_modules\polka\build.js:64:19)
at processImmediate (node:internal/timers:466:21)

Server crashed_

@go-aegian
Copy link
Author

Here are the dependencies installed, node v16.4.0, npm v7.19.0

"dependencies": {
"@types/uuid": "^8.3.0",
"add": "^2.0.6",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"date-fns": "^2.22.1",
"dotenv": "^10.0.0",
"flatpickr": "^4.6.9",
"fs": "^0.0.2",
"https": "^1.0.0",
"moment": "^2.29.1",
"node-fetch": "^2.6.1",
"polka": "next",
"prebuild": "^10.0.1",
"random-uuid-v4": "^0.0.9",
"sirv": "^1.0.12",
"uuid": "^8.3.2",
"uuid-v4": "^0.1.0"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@babel/runtime": "^7.14.6",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"autoprefixer": "^10.2.6",
"node-sass": "^6.0.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.3.5",
"rollup": "^2.52.3",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-svelte-svg": "^0.2.3",
"rollup-plugin-terser": "^7.0.2",
"sapper": "^0.29.1",
"svelte": "^3.38.3",
"svelte-i18n": "^3.3.9",
"svelte-preprocess": "^4.7.3"
}

Just running npm run dev generates that error, there are no other repro steps

@Oliver-Piorun
Copy link

Try "polka": "1.0.0-next.11"

Greetings!

@go-aegian
Copy link
Author

Thanks @Oliver-Piorun it worked, only getting a strange message

(node:5164) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at d:\project\test\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)

@Oliver-Piorun
Copy link

Hi! Seems like this issue/warning is already known: microsoft/tslib#134
Does it affect the build of your sapper app?

Greetings!

@go-aegian
Copy link
Author

Hi Oliver, thanks for your reply. No it does not affect build/run at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants