NativeScript / NativeScript/nativescript-cli
CLI Installation fails when excecuting 'postininstall.js / postuninstall.js'
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
- CLI: 7.0.6
- Windows 10 x64
- Node 12.18.3 / Tried Current and 10.
- Npm v6.14.6 / Tried clearing cache and reinstalling everything including node.
I'm trying to install the cli but can't get a work around.
C:\Users\prego\AppData\Roaming\npm\ns -> C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\bin\tns
> nativescript@7.0.6 postinstall C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript
> node postinstall.js
Error: Illegal characters in path.
at pathArg (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\lib\path-arg.js:20:27)
at Function.mkdirpSync [as sync] (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:18:10)
at FileSystem.createDirectory (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\file-system.js:176:16)
at new CancellationService (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\services\cancellation.js:24:22)
at Yok.resolveConstructor (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\yok.js:313:20)
at Yok.resolveByName (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\yok.js:343:33)
at Yok.resolve (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\yok.js:278:25)
at C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\yok.js:308:29
at Array.map (<anonymous>)
at Yok.resolveConstructor (C:\Users\prego\AppData\Roaming\npm\node_modules\nativescript\lib\common\yok.js:303:48)
I tested it with debugger and seems to fail parsing something like 'C:\Users\prego\AppData\Local\Temp\C:\Users\prego\KillSwitches' which is the received path arg at /path-arg.js
And right after this evaluation
const badWinChars = /[*|"<>?:]/
const {root} = parse(path)
if (badWinChars.test(path.substr(root.length))
Logs this error in console.
(node:3216) [DEP0016] DeprecationWarning: 'root' is deprecated, use 'global'
I didn't find anything related to this, just one issue with a similar error but tried everything and it didn't work.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi cài đặt Windows CLI và lần theo đường dẫn được truyền từ postinstall.js vào lib/common/services/cancellation.js và lib/common/file-system.js. So sánh đường dẫn được tạo với bước xác thực của mkdirp path-arg.js, sau đó xác minh rằng quá trình cài đặt npm hoàn tất mà không có đường dẫn không hợp lệ trên thiết lập Node và Windows được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, nodejs
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100