小编Pus*_*ama的帖子

@angular-cli 安装失败,请求已弃用@2.88.2:请求已被弃用(mac)

将 node.js 和 npm 更新为当前 LTS 后:

node -v
v12.16.0
Run Code Online (Sandbox Code Playgroud)
npm -v
6.13.4
Run Code Online (Sandbox Code Playgroud)

当我尝试按照文档中的步骤安装 @angular-cli 时, 在终端中运行会停止安装,控制台输出为:npm install -g @angular/cli

npm install -g @angular/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/Users/user/.npm-global/bin/ng -> /USERS/USER/.npm-global/lib/node_modules/@angular/cli/bin/ng

> @angular/cli@9.0.2 postinstall /USERS/USER/.npm-global/lib/node_modules/@angular/cli
> node ./bin/postinstall/script.js

+ @angular/cli@9.0.2
updated 1 package in 12.202s
Run Code Online (Sandbox Code Playgroud)

在这种情况下,ng new project-name产量-bash: ng: command not found。任何帮助都会非常受欢迎,因为我有一个大项目即将到来。谢谢大家。

node.js npm npm-install angular-cli angular

13
推荐指数
1
解决办法
3万
查看次数

找不到模块“axios”

我正在使用 node.js 为 Firebase 函数编写一个小程序。我总是使用 npm 安装我的节点模块,我也只使用 npm 安装了 axios。

但是,当我这样做时,firebase deploy我收到此错误:

在此处输入图片说明

这是我的 package-lock.json

{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "axios": {
      "version": "0.19.0",
      "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
      "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
      "requires": {
        "follow-redirects": "1.5.10",
        "is-buffer": "^2.0.2"
      }
    },
    "debug": {
      "version": "3.1.0",
      "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
      "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
      "requires": {
        "ms": "2.0.0"
      }
    },
    "follow-redirects": {
      "version": "1.5.10",
      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
      "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
      "requires": {
        "debug": "=3.1.0"
      }
    },
    "is-buffer": {
      "version": "2.0.4",
      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
      "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
    },
    "ms": {
      "version": "2.0.0", …
Run Code Online (Sandbox Code Playgroud)

node.js firebase google-cloud-functions axios

11
推荐指数
1
解决办法
2万
查看次数

Cypress 单击未滚动到视图中

有一个用Vue/Nuxt构建的站点,具有SSR,并在页脚中有链接。

进行测试发现链接,链接可见,并click()表示链接不在视图中

单击失败后,链接将滚动到视图。

什么会导致视图无法滚动到视图中?

        it('About us page', () => {
            cy.visit('https://test.fooddocs.ee');
            cy.url().should('include', 'https://test.fooddocs.ee');
            cy.get('footer.page-footer').within(() => {
                cy.get('a')
                    .contains('About us')
                    .should('be.visible')
                    .should('have.attr', 'href', '/about')
                    .click();
            });
            cy.url().should('include', siteUrl + '/about');
            cy.get('main h1').should('contain', 'Our team');
        });
Run Code Online (Sandbox Code Playgroud)

测试截图

javascript vue.js nuxt.js cypress

7
推荐指数
1
解决办法
1万
查看次数

React Native - VSCode 中 twrnc 包的 Tailwind CSS 自动完成

我正在使用twrnc包在 React Native 项目中使用 Tailwind CSS。

其语法是,

<View style={styles.container}>
  <Text style={tw.style`text-green-500 font-bold`}>Open up App.js to start working on your app!</Text>
  <StatusBar style="auto" />
</View>
Run Code Online (Sandbox Code Playgroud)

但我没有从 VSCode 获得有关 Tailwind CSS 类的建议。任何人都可以建议或帮助获得课程建议吗?

npm react-native tailwind-css

2
推荐指数
1
解决办法
3704
查看次数