GVKun编程网logo

错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”(错误使用mex未找到支持的编译器或sdk)

14

本文的目的是介绍错误:使用Ionic时找不到模块“../lib/utils/unsupported.js”的详细情况,特别关注错误使用mex未找到支持的编译器或sdk的相关信息。我们将通过专业的研究、

本文的目的是介绍错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”的详细情况,特别关注错误使用mex未找到支持的编译器或sdk的相关信息。我们将通过专业的研究、有关数据的分析等多种方式,为您呈现一个全面的了解错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”的机会,同时也不会遗漏关于angular – Ionic 2 – 运行时错误找不到模块“.”、angularjs – 错误:找不到模块’@ ionic/app-scripts’、django.db.utils.NotSupportedError: Renaming the 'apps_article' table while in a transaction is not supported on SQLite、FileNotFoundError:使用 jupyter notebook 导入 sklearn 时找不到模块的知识。

本文目录一览:

错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”(错误使用mex未找到支持的编译器或sdk)

错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”(错误使用mex未找到支持的编译器或sdk)

当我运行“Ionic 启动项目名称”时,我总是收到此错误消息:

错误信息

Running command - failed![ERROR] An error occurred while running npm install (exit code 1):    module.js:471        throw err;        ^    Error: Cannot find module ''../lib/utils/unsupported.js''        at Function.Module._resolveFilename (module.js:469:15)        at Function.Module._load (module.js:417:25)        at Module.require (module.js:497:17)        at require (internal/module.js:20:19)        at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21        at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:79:3)        at Module._compile (module.js:570:32)        at Object.Module._extensions..js (module.js:579:10)        at Module.load (module.js:487:32)        at tryModuleLoad (module.js:446:12)

答案1

小编典典

尝试/usr/local/lib/node_modules/npm再次删除并重新安装节点。这应该有效。

在带有Homebrew的 MacOS 上:

sudo rm -rf /usr/local/lib/node_modules/npmbrew reinstall node

angular – Ionic 2 – 运行时错误找不到模块“.”

angular – Ionic 2 – 运行时错误找不到模块“.”

使用以下命令将Ionic 2应用程序提供给localhost时遇到此错误:

ionic serve

我不确定这个错误源于何处.我仔细地仔细检查了我的TypeScript文件中所有导入的损坏路径.我什么都没找到.

应用程序工作和不工作之间唯一的变化是添加了一个用于保存Google地图位置数据的新界面.

但是我不知道这是如何相关的,它必须是构建过程中的其他东西.

app.modules.ts

import { NgModule,ErrorHandler } from '@angular/core';
import { IonicApp,IonicModule,IonicErrorHandler } from 'ionic-angular';
import { IonicStorageModule } from '@ionic/storage';
import { MyApp } from './app.component';
import { Geolocation } from '@ionic-native/geolocation';
import { Place } from '../model/place.model';
import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';

import { NewPlacePage } from '../pages/new-place/new-place';
import { PlacePage } from '../pages/place/place';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { ActivePage } from '../pages/active/active';
import { PlacesService } from '../services/places.service';
import { ConnectivityService } from '../providers/connectivity-service';
import {AgmCoreModule }  from 'angular2-google-maps/core'

@NgModule({
  declarations: [
    MyApp,AboutPage,ContactPage,HomePage,TabsPage,ActivePage,NewPlacePage,PlacePage
  ],imports: [
    IonicModule.forRoot(MyApp),IonicStorageModule.forRoot(),AgmCoreModule.forRoot({
      apiKey: 'hiddenforstackoverflow'
    })
  ],bootstrap: [IonicApp],entryComponents: [
    MyApp,providers: [{provide: ErrorHandler,useClass: IonicErrorHandler},ConnectivityService,PlacesService,Storage]
})
export class AppModule {}

places.service.ts

import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
import { Place } from '../model/place.model';


@Injectable()
export class PlacesService {

    private places: Place[] = [];


    constructor(private storage: Storage) { }
    addplace(place: Place) {
        this.places.push(place);

        console.log(this.places);
        this.storage.set('places',this.places);

    }

    getPlaces() {
        return this.storage.get('places')
            .then(
            (places) => {
                this.places = places == null ? [] : places;
                console.log(this.places);
                console.log(places);
                return this.places.slice();
            });

    }
}

newplace.ts

import { Component,Injectable } from '@angular/core';
import { NavController,NavParams } from 'ionic-angular';
import { PlacesService } from '../../services/places.service';
import { Geofence,Geolocation,SMS } from 'ionic-native';


@Component({
  selector: 'page-new-place',templateUrl: 'new-place.html'
})


export class NewPlacePage {

  location: { lat: number,lng: number } = { lat: 0,lng: 0 };

  constructor(private placesService: PlacesService,private navCtrl: NavController) { }

  onLocateUser() {
    Geolocation.getCurrentPosition()
      .then(
      (location) => {
        console.log('Location successful')
        this.location.lat = location.coords.latitude;
        this.location.lng = location.coords.longitude
      }
      )
  }
  onAddplace(value: { title: string }) {
    console.log(value);
    this.placesService.addplace({ title: value.title,location: this.location });
    this.navCtrl.pop();

  }

}

place.model.ts

export interface Place {
    title: string;
    location: {
        lat: number,lng: number
    }
}

离子版本

Ionic Framework: 2.2.0
    Ionic Native: ^2.4.1
    Ionic App Scripts: 1.2.5
    Angular Core: 2.4.8
    Angular Compiler CLI: 2.4.8
    Node: 7.7.4
    OS Platform: Windows 10
    Navigator Platform: Win32
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/56.0.2924.87 Safari/537.36

的package.json

{
  "name": "ionic-hello-world","author": "Ionic Framework","homepage": "http://ionicframework.com/","private": true,"scripts": {
    "clean": "ionic-app-scripts clean","build": "ionic-app-scripts build","ionic:build": "ionic-app-scripts build","ionic:serve": "ionic-app-scripts serve"
  },"dependencies": {
    "@angular/common": "2.4.8","@angular/compiler": "2.4.8","@angular/compiler-cli": "2.4.8","@angular/core": "2.4.8","@angular/forms": "2.4.8","@angular/http": "2.4.8","@angular/platform-browser": "2.4.8","@angular/platform-browser-dynamic": "2.4.8","@angular/platform-server": "2.4.8","@ionic-native/core": "^3.4.4","@ionic-native/geolocation": "^3.4.4","@ionic/storage": "2.0.0","@types/google-maps": "^3.2.0","angular2-google-maps": "^0.17.0","ionic-angular": "2.2.0","ionic-native": "^2.4.1","ionicons": "3.0.0","typescript": "2.0.9","rxjs": "5.0.1","sw-toolBox": "3.4.0","zone.js": "0.7.2"
  },"devDependencies": {
    "@ionic/app-scripts": "^1.2.5","typescript": "2.0.9"
  },"cordovaPlugins": [
    "cordova-plugin-whitelist","cordova-plugin-console","cordova-plugin-device","cordova-plugin-statusbar","cordova-plugin-splashscreen","ionic-plugin-keyboard"
  ],"cordovaPlatforms": [],"description": "ionic-boiler: An Ionic project"
}

任何人都可以提供有关如何进一步调试的建议吗?我应该调试polyfils.ts文件吗?

解决方法

我可以看到你的方法有两个问题.

问题1:你必须删除这个旧模块“ionic-native”:“^ 2.4.1”,然后运行npm i

问题2:您需要在providers数组(app.module.ts)中注入Geolocation.您必须使用最新的离子本机(“@ ionic-native / core”:“^ 3.4.4”)执行此操作.

你可以在这里阅读更多相关信息:Ionic Native.

angularjs – 错误:找不到模块’@ ionic/app-scripts’

angularjs – 错误:找不到模块’@ ionic/app-scripts’

我是Ionic的新手.我按照Ionic文档“开始”,创建了一个名为“super”的项目示例.问题是当我在项目目录中运行命令行ionic serve时,它会抛出一个错误错误:找不到模块’@ ionic / app-scripts’
目前与节点6和7兼容的app脚本. 如果你安装了节点8,那么请卸载并安装node 6 stable版本. 这解决了错误,现在我可以使用离子3,角4. 保重!

django.db.utils.NotSupportedError: Renaming the 'apps_article' table while in a transaction is not supported on SQLite

django.db.utils.NotSupportedError: Renaming the 'apps_article' table while in a transaction is not supported on SQLite

在测试项目中,数据库:sqlite,修改表名时提示错误:

django.db.utils.NotSupportedError: Renaming the ''apps_article'' table while in a transaction is not supported on sqlite < 3.26 because it would break referential integrity. 
Try adding `atomic = False` to the Migration class.

中文意思:

sqlite不支持在事务中重命名apps_article表,因为它会破坏参照完整性。尝试添加atomic = False到Migration类。

解决方法:

文件路径:项目路径\apps\migrations\0006_auto_20190708_1144.py

from django.db import migrations


class Migration(migrations.Migration):
    atomic = False  # 添加atomic
    dependencies = [
        (''apps'', ''0005_auto_20190701_2022''),    ]

    operations = [
        migrations.AlterModelOptions(
            name=''article'',            options={''ordering'': [''-pub_date''], ''verbose_name'': ''文章表'', ''verbose_name_plural'': ''文章表''},        ),        migrations.AlterModelTable(
            name=''article'',            table=''article'',    ]


FileNotFoundError:使用 jupyter notebook 导入 sklearn 时找不到模块

FileNotFoundError:使用 jupyter notebook 导入 sklearn 时找不到模块

如何解决FileNotFoundError:使用 jupyter notebook 导入 sklearn 时找不到模块?

当我尝试在 jupyter 笔记本中 import sklearn 时,我收到如下错误消息:@H_301_3@

FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-ae13d4c4c2fb> in <module>
      1 # Scikit-Learn ≥0.20 is required
----> 2 import sklearn
      3 assert sklearn.__version__ >= "0.20"

D:\anaconda3\lib\site-packages\sklearn\__init__.py in <module>
     80     from . import _distributor_init  # noqa: F401
     81     from . import __check_build  # noqa: F401
---> 82     from .base import clone
     83     from .utils._show_versions import show_versions
     84 

D:\anaconda3\lib\site-packages\sklearn\base.py in <module>
     15 from . import __version__
     16 from ._config import get_config
---> 17 from .utils import _IS_32BIT
     18 from .utils._tags import (
     19     _DEFAULT_TAGS,D:\anaconda3\lib\site-packages\sklearn\utils\__init__.py in <module>
     18 import warnings
     19 import numpy as np
---> 20 from scipy.sparse import issparse
     21 
     22 from .murmurhash import murmurhash3_32

D:\anaconda3\lib\site-packages\scipy\__init__.py in <module>
    128 
    129     # Allow distributors to run custom init code
--> 130     from . import _distributor_init
    131 
    132     from scipy._lib import _pep440

D:\anaconda3\lib\site-packages\scipy\_distributor_init.py in <module>
     57             os.chdir(libs_path)
     58             for filename in glob.glob(os.path.join(libs_path,''*dll'')):
---> 59                 WinDLL(os.path.abspath(filename))
     60         finally:
     61             os.chdir(owd)

D:\anaconda3\lib\ctypes\__init__.py in __init__(self,name,mode,handle,use_errno,use_last_error,winmode)
    371 
    372         if handle is None:
--> 373             self._handle = _dlopen(self._name,mode)
    374         else:
    375             self._handle = handle

FileNotFoundError: Could not find module ''D:\anaconda3\lib\site-packages\scipy\.libs\libbanded5x.EHDKC2XVYTQQ5MAlrs6XN2CUSS6SRL6P.gfortran-win_amd64.dll'' (or one of its dependencies). Try using the full path with constructor Syntax.

但我很确定所谓的丢失文件就在那里!请指教!@H_301_3@

!jupyter kernelspec list --json@H_301_3@

{
  "kernelspecs": {
    "anaconda-base": {
      "resource_dir": "C:\\Users\\Wei-shan\\AppData\\Roaming\\jupyter\\kernels\\anaconda-base","spec": {
        "argv": [
          "D:\\anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}"
        ],"env": {},"display_name": "Anaconda (base)","language": "python","interrupt_mode": "signal","Metadata": {}
      }
    },"python3": {
      "resource_dir": "C:\\Users\\Wei-shan\\AppData\\Roaming\\jupyter\\kernels\\python3","display_name": "Python 3","vpython": {
      "resource_dir": "C:\\Users\\Wei-shan\\AppData\\Roaming\\jupyter\\kernels\\vpython","spec": {
        "argv": [
          "D:/Anaconda3/python.exe","Metadata": {}
      }
    }
  }
}

解决方法

我遇到了同样的问题。就我而言,它在降级到 tornado=6.0.4、scikit-learn=0.23.2 和 scypi=1.5.2 后解决了。

我们今天的关于错误:使用 Ionic 时找不到模块“../lib/utils/unsupported.js”错误使用mex未找到支持的编译器或sdk的分享就到这里,谢谢您的阅读,如果想了解更多关于angular – Ionic 2 – 运行时错误找不到模块“.”、angularjs – 错误:找不到模块’@ ionic/app-scripts’、django.db.utils.NotSupportedError: Renaming the 'apps_article' table while in a transaction is not supported on SQLite、FileNotFoundError:使用 jupyter notebook 导入 sklearn 时找不到模块的相关信息,可以在本站进行搜索。

本文标签: