npm

Typescript no type definition found

☆樱花仙子☆ 提交于 2021-02-10 15:12:51
问题 I made a typescript module that I published on npm, however I can't get intellisens to work. The file structure is as such dist index.js + others src index.ts + others package.json tsconfig.json src contains the .ts files, and dist the .js , .d.ts , .js.map . If I do this: import { X } from 'my-package'; It will work, no error, but no intellisens, and the message is the type definition is not found . However if I do this: import { X } from 'my-package/dist'; I do get intellisens. In package

Installation of ionic sidemenu results in “zliberror: zlib: unexpected end of file”

廉价感情. 提交于 2021-02-10 14:51:01
问题 My npm version: 6.4.1 node: 10.14.1 Ionic: 4.7.0 Cordova: 8.1.2 (Basically all of them are of the latest version) When I try to install an ionic sidemenu at a specific location, an error occurs as such: npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! zlib: unexpected end of file npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\15432\AppData

Error building with ng build --prod. Fine without --prod flag and ng serve

痴心易碎 提交于 2021-02-10 14:23:33
问题 I have a project that built fine with ng build --prod until I upgraded the version of TypeScript from 2.72 to 2.92 in my package.json. After upgrading, I now get the following error: ERROR in Cannot read property 'Symbol(Symbol.iterator)' of undefined However, the project builds fine using ng build and runs fine using ng serve so I have no idea where this problem is occurring and the error doesn't tell me where the problem is in my project. 回答1: I found the issue. Using resolveJsonModule

create-react-app 引入ant design 及 使用 less

雨燕双飞 提交于 2021-02-10 13:27:42
全局引入: 第一步 :全局安装 create-react-app npm install create-react-app -g 第二步 :安装 yarn npm install -g yarn 第三步 :安装 antd yarn add antd 第四步 :安装 babel-plugin-import npm install babel-plugin-import --save-dev 第五步 :暴露配置项 npm run eject 发现执行此操作报错了,不管他什么错,接着执行 yarn install 然后执行 npm run eject 此时可以成功 .会自动生成一个config的文件夹,时候我们先配置dev模式 第五点一步 :打开config文件夹下面的webpack.config.dev.js文件 添加一下代码 (可要可不要) plugins: [ ' transform-runtime ' , [ ' import ' , { libraryName: ' antd ' , style: ' css ' }]] 但是当你执行npm start 的时候会发现不行 报错了. 那么此时只要是再执行一次npm install 就可以 然后执行 npm start 项目就可以运行啦 第六步 :引入css文件 import ' antd/dist/antd.css '

I am getting npm error while installing react navigation. Do anyone know about this issue?

浪子不回头ぞ 提交于 2021-02-10 12:50:51
问题 ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/react-navigation/react-native-tab-view.git /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2 npm ERR! /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /Users/nakul/.npm/_logs/2018-04-14T10_46_28_136Z-debug.log 回答1: Try chmod -R 777 ~/.npm then reinstall. Or rm -rf ~/.npm and reinstall. ~/.npm is a temp directory and can be

I am getting npm error while installing react navigation. Do anyone know about this issue?

删除回忆录丶 提交于 2021-02-10 12:49:27
问题 ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/react-navigation/react-native-tab-view.git /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2 npm ERR! /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /Users/nakul/.npm/_logs/2018-04-14T10_46_28_136Z-debug.log 回答1: Try chmod -R 777 ~/.npm then reinstall. Or rm -rf ~/.npm and reinstall. ~/.npm is a temp directory and can be

I am getting npm error while installing react navigation. Do anyone know about this issue?

北战南征 提交于 2021-02-10 12:48:53
问题 ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q git://github.com/react-navigation/react-native-tab-view.git /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2 npm ERR! /Users/nakul/.npm/_cacache/tmp/git-clone-818101c2/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /Users/nakul/.npm/_logs/2018-04-14T10_46_28_136Z-debug.log 回答1: Try chmod -R 777 ~/.npm then reinstall. Or rm -rf ~/.npm and reinstall. ~/.npm is a temp directory and can be

TypeError trying to run npm run build

怎甘沉沦 提交于 2021-02-10 12:12:40
问题 Running npm run build on my angular application errors out like below. I tried updating the typescript version but it doesn't help. Please suggest what can be done. Can someone please help? I read that this is due to circular dependencies. How do I resolve those in the node_modules? Object prototype may only be an Object or null: undefined TypeError: Object prototype may only be an Object or null: undefined at setPrototypeOf () at Object.__extends (C:\Users\twdas\Documents\SDTM-POC\bitbucket

TypeError trying to run npm run build

谁都会走 提交于 2021-02-10 12:11:52
问题 Running npm run build on my angular application errors out like below. I tried updating the typescript version but it doesn't help. Please suggest what can be done. Can someone please help? I read that this is due to circular dependencies. How do I resolve those in the node_modules? Object prototype may only be an Object or null: undefined TypeError: Object prototype may only be an Object or null: undefined at setPrototypeOf () at Object.__extends (C:\Users\twdas\Documents\SDTM-POC\bitbucket

handling duplicate npm packages

二次信任 提交于 2021-02-10 06:54:11
问题 I have submodules that install the same npm packages. Their node modules install same npm packages as other node modules in the repo. How can i consolidate all of the npm packages into one package.json file so that there are no duplicate packages installed? 回答1: @slebetman is correct. Libraries may share dependencies, but they will likely use different versions of each. Also, shameless plug to a very similar question I answered a while back where someone was essentially asking "Why not